For this analysis, our team answers the question:
Using publicly-available data from 2012-2021, we construct a portfolio that simulates Senators' stock trades (buying and selling of stocks) over this 9.5-year period and measure its performance against the S&P 500 index.
The S&P 500 index is the best-known indicator of the U.S. stock market's performance, measuring the value — and thus the performance — of the 500 largest stocks in the U.S., so much so that it is often referred to simply as "the market." The 500 companies whose stocks are included in the S&P 500 are very well-known companies that we frequently encounter in our day-to-day lives:
Many investors measure professional money managers' performance against the S&P 500. The thinking goes that an investor has 2 mutually-exclusive choices:
If the professional money manager can't perform better on a percentage basis than the S&P 500, then the investor should just buy the S&P 500 ETF since they'd make more money that way and at a lower cost and risk. Professional money managers charge fees for managing investors' money and can make riskier investments in things like private equity. Therefore, to make it worthwhile for investors to accept a higher cost and risk by investing their money with them, professional money managers need to perform better on a percentage basis than the market (expressed through the S&P 500).
Here's a chart of the S&P 500's value at the end of each trading day from 1950-2016. One way to easily interpret the chart is: If you'd spent a handful of dollars to buy a single share of an S&P 500 ETF in 1950, you could sell that 1 share for $2,000 in 2016:
Studies have consistently shown that most professional money managers underperform the S&P 500 — over a period of 15 years, only 5% of professional money managers managed to beat it. Therefore, if we find that Senators have outperformed the S&P 500 over the past 9.5 years, then our finding would be significant since it would show that Senators — many of whom are lawyers and businessmen, not money managers — are better at investing than 95% of professional money managers, which would be an incredibly rare and impressive achievement indeed.
The question would then be: How can Senators be above-average at investing?
Although [insider trading](https://en.wikipedia.org/wiki/Insider_trading) — trading a company's stock based on material, nonpublic ("insider") information about the company — has been illegal and punishable by fines and/or imprisonment for most private citizens in the U.S. since 1934, it was not illegal for members of Congress until 2012. The Stop Trading on Congressional Knowledge [(STOCK) Act](https://en.wikipedia.org/wiki/STOCK_Act) was passed by Congress and signed into law by President Obama on April 4, 2012 to ban insider trading among members of Congress.
Specifically, the act prohibits members of Congress and other government officials from using, for personal benefit, insider information that they acquired through their government positions. This means that if a member of Congress acquires information that may positively impact a company but has not yet been disclosed to the public, then they cannot buy that company's stock until the information that they acquired becomes public. And if a member of Congress acquires information that may negatively impact a company whose stock that they own but has not yet been disclosed to the public, then they cannot sell that company's stock until the information that they acquired becomes public. The act also requires all members of Congress to publicly disclose any financial transactions (mostly the buying and selling) of stocks, bonds, commodities, futures, options, cryptocurrencies, and other securities within 30-45 days of the transaction.
In the nearly 10 years since the STOCK Act became law, however, stock trading by members of Congress has repeatedly caused controversy and raised ethical concerns. In 2020, a major insider trading scandal occurred when 6 Senators sold stocks after attending a confidential briefing on the coronavirus outbreak in January 2020, potentially avoiding losses when the stock market crashed in March 2020. In 2021, Business Insider identified 127 current members of Congress who had either personally or whose staffers had violated provisions of the STOCK Act:
Before the STOCK Act made insider trading by members of Congress illegal, members of Congress had performed exceptionally well compared to the S&P 500. A 2004 study in the Journal of Financial and Quantitative Analysis found that Senators outperformed the S&P 500 by an astonishing average of 12 percentage points per year (or 1 percentage point per month) during a 6-year period in the bull market of the 1990s. This means that if the S&P 500's value increased by 10% over 1 year, then the value of a portfolio consisting of all trades made by Senators during that year would increase by 22%.
Senators didn't just beat an already high-performing market: They also beat corporate insiders (people who were trading their own company's stock) — who outperformed the market by an average of 6 percentage points per year — and U.S. households — who underperformed the market by an average of 1.4 percentage points per year. Senators also appeared to know exactly when to buy and sell stocks: They would buy stocks just before the stocks would suddenly outperform the market by more than 25%, and they would sell stocks that had been beating the market by about 25% for the past year just when the stocks would fall back in line with the market's performance. The study's researchers suggested that Senators knew when to buy and sell stocks because they had access to information based on their government positions that other investors didn't have — in other words, they were engaging in insider trading.
Therefore, another question that our analysis will help answer is:
If we find that Senators continued to outperform the S&P 500 from 2012-2021, after the STOCK Act was passed, then we may have evidence that the STOCK Act didn't achieve its goal of preventing Senators from benefiting from insider trading. On the flip side, if we find that Senators didn't outperform the S&P 500 from 2012-2021, then we may have evidence that the STOCK Act did prevent Senators from benefiting from insider trading.
To answer this question, we'll treat the Senate as 1 cohesive unit. We'll download data on all of the stock trades that they've disclosed since the STOCK Act was passed in 2012 and use Python to construct a portfolio that simulates their trades (buys and sells) over this 9.5-year period. This means that we'll buy the same amount of the same stock that they bought on the same day in the past and sell the same amount of the same stock that they sold on the same day in the past. Then, we'll convert the portfolio into an index that we'll compare with the S&P 500 index to see whether Senators performed better than the S&P 500 on a percentage basis in the 9.5 years since the STOCK Act was passed.
We download 4 datasets. For each dataset, we download data from July 25, 2021 (when the first trade was disclosed under the newly-enacted STOCK Act) to December 8, 2021 (when we were writing the code for this project):
# from google.colab import drive
import re
import numpy as np
import pandas as pd
import math
import inspect
from enum import Enum, unique
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings("ignore") # (This code was added at the end to get rid of some warnings below.)
try:
drive.mount("/content/drive") # Exception handling here in case the drive is already mounted.
except:
pass
pd.set_option("display.max_rows", 10)
senate_data = pd.read_csv("all_transactions_SENATE_12-8-21.csv")
senate_data.head() # Previewing the first five rows of the Senate transaction data.
| transaction_date | owner | ticker | asset_description | asset_type | type | amount | comment | senator | ptr_link | disclosure_date | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 11/29/2021 | Self | CAG | ConAgra Brands, Inc. Common Stock | Stock | Purchase | $1,001 - $15,000 | -- | Gary C Peters | https://efdsearch.senate.gov/search/view/ptr/6... | 12/7/2021 |
| 1 | 11/29/2021 | Self | OFC | Corporate Office Properties Trust Common Stock | Stock | Purchase | $1,001 - $15,000 | -- | Gary C Peters | https://efdsearch.senate.gov/search/view/ptr/6... | 12/7/2021 |
| 2 | 11/9/2021 | Self | -- | VZ | Stock | Purchase | $1,001 - $15,000 | -- | Gary C Peters | https://efdsearch.senate.gov/search/view/ptr/6... | 12/7/2021 |
| 3 | 11/9/2021 | Child | -- | W.L. Gore & Associates Inc. <div class="te... | Non-Public Stock | Sale (Partial) | $1,001 - $15,000 | Gorfam Inc. sold stock to benefit another shar... | Christopher A Coons | https://efdsearch.senate.gov/search/view/ptr/3... | 11/29/2021 |
| 4 | 11/9/2021 | Child | -- | W.L. Gore & Associates Inc. <div class="te... | Non-Public Stock | Sale (Partial) | $1,001 - $15,000 | Gorfam Inc. sold stock to benefit another shar... | Christopher A Coons | https://efdsearch.senate.gov/search/view/ptr/3... | 11/29/2021 |
If you go through all 8,929 rows of the Senate data, you'll see that the data is inconsistently formatted. This may be due to the Senate changing the format that it reported transactions in over time. Specifically:
asset_description column instead of the ticker column, where it should belong. Therefore, you'll have to use regular expressions to find tickers that were improperly listed in the asset_description column and copy them into the ticker column.asset_type column, which specifies the type of security that was traded (i.e., stock, bond, option, etc.), is blank for transaction dates from 7/25/2012 to 12/18/2014, after which Senators began filling it out. Therefore, for transaction dates from 7/25/2012 to 12/18/2014, you'll have to look at the ticker column to determine whether a particular transaction was a stock trade.Therefore, given the inconsistent formatting of the Senate dataset, we'll have to clean it before we can analyze it.
# Only keep stocks with a valid ticker, amount, transaction date, transaction type, senator, and disclosure date
ticker_csv_pattern = r"^[A-Z0-9-\.]{1,5}$" # Tickers may be longer than five characters, but here it is limited to five to avoid complication
# This pattern is used below for finding tickers in the asset_description column
# The actual pattern should be 1 to 9 characters instead of 1 to 5, and without dashes (some of the data in the spreadsheet had dashes)
senate_data = senate_data[(senate_data.type == 'Purchase') |
(senate_data.type == 'Sale (Full)') |
(senate_data.type == 'Sale (Partial)')] # Keep only these transaction types
# This for loop salvages rows where tickers were put in the asset_description column, but not in the ticker column:
for row, row_str in senate_data[senate_data.ticker == "--"].iterrows():
asset_description = senate_data.loc[row, 'asset_description'].upper()
if (re.match(ticker_csv_pattern, asset_description)):
senate_data.loc[row, 'ticker'] = asset_description
senate_data = senate_data[senate_data.ticker != '--'] # Remove blank tickers
# This for loop salvages rows where the asset_type was left blank, but it was clear that the row was a stock transaction:
for row, row_str in senate_data.iterrows():
if (str(senate_data.loc[row, 'asset_type']) == "nan"): # If the asset_type is empty, then it will be a float, so converted to a string it is nan
asset_description = senate_data.loc[row, 'asset_description'].upper()
# This if statement checks for key words in the description that would tell that the transaction is an options transaction
if ("OPTION" not in asset_description and "CALL" not in asset_description and "PUT" not in asset_description):
senate_data.loc[row, 'asset_type'] = "Stock"
# Using the two for loops above salvaged a lot of data adding about 700 transactions and over 100 tickers to the data.
senate_data = senate_data[senate_data.asset_type == "Stock"] # Only keep stocks from the data (excludes bonds and derivatives)
senate_data = senate_data.drop(columns = ['owner', 'asset_description', 'asset_type', 'comment', 'ptr_link'])
senate_data = senate_data[senate_data.ticker != "SPY160219P00180000"] # One Senator listed SPY puts as stocks instead of options
senate_data = senate_data.dropna()
# Given that Senators don't report the exact amounts that they traded, we must approximate trade amounts. We chose to take
# the lower end of the ranges that they reported to avoid overestimating trade amounts and better account for partial (instead of
# full) stock sales.
def f(row):
if row['amount'] == "$1,001 - $15,000":
val = 1001
elif row['amount'] == "$15,001 - $50,000":
val = 15001
elif row['amount'] == "$50,001 - $100,000":
val = 50001
elif row['amount'] == "$100,001 - $250,000":
val = 100001
elif row['amount'] == "$250,001 - $500,000":
val = 250001
elif row['amount'] == "$500,001 - $1,000,000":
val = 500001
elif row['amount'] == "$1,000,001 - $5,000,000":
val = 1000001
elif row['amount'] == "$5,000,001 - $25,000,000":
val = 5000001
elif row['amount'] == "$25,000,001 - $50,000,000":
val = 25000001
elif row['amount'] == "Over $50,000,000":
val = 50000001
return val
senate_data['lower_bound_amount'] = senate_data.apply(f, axis=1) # Convert trade amounts to the lower end of reported ranges.
senate_data.rename(columns = {'type':'transaction_type'}, inplace=True)
senate_data['transaction_date'] = pd.to_datetime(senate_data.transaction_date)
senate_data['disclosure_date'] = pd.to_datetime(senate_data.disclosure_date)
senate_data = senate_data.sort_values(by = 'transaction_date') # Sort trades by chronological order.
print("Number of transactions: " + str(len(senate_data)))
print("Number of tickers: " + str(len(senate_data.ticker.unique())))
senate_data.head(100) # Preview the cleaned senate stock transaction data.
Number of transactions: 6474 Number of tickers: 1017
| transaction_date | ticker | transaction_type | amount | senator | disclosure_date | lower_bound_amount | |
|---|---|---|---|---|---|---|---|
| 7706 | 2012-09-13 | DD | Purchase | $1,001 - $15,000 | Thomas R Carper | 2015-05-13 | 1001 |
| 7705 | 2012-12-17 | DD | Purchase | $1,001 - $15,000 | Thomas R Carper | 2015-05-13 | 1001 |
| 7704 | 2013-03-15 | DD | Purchase | $1,001 - $15,000 | Thomas R Carper | 2015-05-13 | 1001 |
| 8484 | 2013-04-29 | CG | Purchase | $100,001 - $250,000 | John Hoeven | 2014-05-08 | 100001 |
| 7703 | 2013-06-13 | DD | Purchase | $1,001 - $15,000 | Thomas R Carper | 2015-05-13 | 1001 |
| ... | ... | ... | ... | ... | ... | ... | ... |
| 8596 | 2014-03-13 | BEAV | Purchase | $15,001 - $50,000 | Sheldon Whitehouse | 2014-03-26 | 15001 |
| 8595 | 2014-03-13 | VFC | Sale (Partial) | $1,001 - $15,000 | Sheldon Whitehouse | 2014-03-26 | 1001 |
| 8590 | 2014-03-13 | VFC | Sale (Partial) | $1,001 - $15,000 | Sheldon Whitehouse | 2014-03-26 | 1001 |
| 8589 | 2014-03-13 | KO | Sale (Partial) | $1,001 - $15,000 | Sheldon Whitehouse | 2014-03-26 | 1001 |
| 8608 | 2014-03-14 | AEP | Sale (Partial) | $1,001 - $15,000 | Susan M Collins | 2014-03-25 | 1001 |
100 rows × 7 columns
Compustat takes a .txt file containing the tickers that we want data for with one ticker on each line. Therefore, we'll write all of the unique tickers that Senators traded to a .txt file and reformat some of them to match Compustat's symbol convention to avoid errors.
# Write all unique tickers to a file. Before giving Compustat the list of tickers to parse, we have to ensure that all tickers
# follow Compustat's symbol convention. Some tickers with non-alphabetic characters (dashes, dots, and numbers) aren't formatted
# according to Compustat's convention. Thus, we reformatted them manually by cross-checking them against Compustat's
# convention.
ticker_file = open("unique_tickers_UNCLEANED.txt", "w")
for ticker in senate_data.ticker.unique():
ticker_file.write(ticker)
ticker_file.write("\n")
ticker_file.close()
# changed_tickers is a dictionary that stores, as keys, tickers from senate_data with non-alphabetic characters (dashes, dots,
# and numbers) and, as values, the tickers reformatted according to Compustat's convention.
changed_tickers = {
"HUB-B": "HUB.B",
"COF-PP": "COF",
"XLS-WI": "XLS.WI",
"BUNT-RP": "BUNT",
"SBUX.SW": "SBUX",
"ADT.F": "ADT.F",
"RDS-B": "RDS.B",
"SYY.SG": "SYY",
"BRK-B": "BRK.B",
"UA-C": "UA",
"NEE-PC": "NEE.PC",
"ZNGA.SW": "ZNGA",
"RDS-A": "RDS.A",
"IBM.MX": "IBM",
"MSTY.PA": "MSTY.PA",
"LGF-B": "LGF.B",
"LM09.SG": "LM09",
"RDSA.AS": "RDSA",
"0QZI.IL": "0QZI",
"3V64.TI": "3V64"
}
# Reformat tickers in senate_data according to Compustat's convention:
for row, row_str in senate_data.iterrows():
ticker = senate_data.at[row, 'ticker']
if ticker in changed_tickers.keys(): # If the ticker is in the list of keys that we have to reformat
senate_data.at[row, 'ticker'] = changed_tickers[ticker] # Reformat the ticker
# After reformatting tickers, write all unique tickers to a file. We'll tell Compustat to download price and volume data for
# every unique ticker from 2012 to 2021.
ticker_file = open("unique_tickers_AUTOMATICALLY_CLEANED.txt", "w")
for ticker in senate_data.ticker.unique():
ticker_file.write(ticker)
ticker_file.write("\n")
ticker_file.close()
Downloading data from Compustat is a manual process that takes place outside of this tutorial. Thus, after we download our data from Compustat as a CSV, we'll load it into our notebook.
# Take historical compustat data for senate tickers:
compustat = pd.read_csv("1010_stock_prices.csv")
compustat.rename(columns = {'gvkey': 'primary_key',
'iid': 'issue_id',
'datadate': 'trading_date',
'tic': 'ticker',
'conm': 'company_name',
'cshtrd': 'trading_volume',
'prccd': 'close',
'prchd': 'high',
'prcld': 'low',
'prcod': 'open',
'trfd': 'total_return_factor',
'tpci': 'security_type',
'ajexdi': 'adjustment_factor'},
inplace = True)
compustat['trading_date'] = pd.to_datetime(compustat.trading_date)
print("Number of tickers from the Compustat data: " + str(len(compustat.ticker.unique())))
compustat.head() # Preview the data grabbed from compustat.
Number of tickers from the Compustat data: 1550
| primary_key | issue_id | trading_date | ticker | company_name | adjustment_factor | trading_volume | close | high | low | ... | costat | dlrsn | ggroup | gind | gsector | gsubind | spcsrc | stko | dldte | ipodate | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1045 | 1 | 2012-07-25 | AAMRQ | AMERICAN AIRLINES GROUP INC | 1.0 | 276272.0 | 0.513 | 0.525 | 0.510 | ... | A | NaN | 2030.0 | 203020.0 | 20.0 | 20302010.0 | C | 0.0 | NaN | NaN |
| 1 | 1045 | 1 | 2012-07-26 | AAMRQ | AMERICAN AIRLINES GROUP INC | 1.0 | 1741493.0 | 0.514 | 0.515 | 0.501 | ... | A | NaN | 2030.0 | 203020.0 | 20.0 | 20302010.0 | C | 0.0 | NaN | NaN |
| 2 | 1045 | 1 | 2012-07-27 | AAMRQ | AMERICAN AIRLINES GROUP INC | 1.0 | 1128873.0 | 0.504 | 0.540 | 0.500 | ... | A | NaN | 2030.0 | 203020.0 | 20.0 | 20302010.0 | C | 0.0 | NaN | NaN |
| 3 | 1045 | 1 | 2012-07-30 | AAMRQ | AMERICAN AIRLINES GROUP INC | 1.0 | 593948.0 | 0.510 | 0.520 | 0.502 | ... | A | NaN | 2030.0 | 203020.0 | 20.0 | 20302010.0 | C | 0.0 | NaN | NaN |
| 4 | 1045 | 1 | 2012-07-31 | AAMRQ | AMERICAN AIRLINES GROUP INC | 1.0 | 450541.0 | 0.507 | 0.520 | 0.500 | ... | A | NaN | 2030.0 | 203020.0 | 20.0 | 20302010.0 | C | 0.0 | NaN | NaN |
5 rows × 24 columns
Compustat has 74 unique variables that you can download for each ticker. We downloaded 21 of them, although we don't use all of them in our analysis. The CSV that we downloaded has 2,591,494 rows and 363 MB of data, so it is a large dataset.
Compustat provides the open, high, low, and close prices, the trading volume, and the adjustment factor for each trading day in our analysis period (7/25/2012 to 12/8/2021) for each ticker that Senators traded. Under the gsector column, Compustat also lists the Global Industry Classification Standard (GICS) sector that that company's stock is classified under. There are 11 GICS sectors, which represent the major economic sectors that businesses operate within: Consumer Discretionary, Consumer Staples, Energy, Materials, Industrials, Healthcare, Financials, Information Technology, Real Estate, Communication Services, and Utilities. Here's a chart showing the sector breakdowns for the companies in the S&P 500:
The adjustment factor is a value that we divide each stock price by. Companies can perform a stock split — when they split 1 share of stock into more shares of stock — if they want to keep their stock price within a certain range. For example, if you own 1 share of Tesla stock and Tesla performs a 2-for-1 stock split when its stock price is \$100, then you now own 2 shares of Tesla (since you get 2 shares for each share of Tesla that you own) and Tesla's stock price is now \$50 (since each share was split in half, so its price must also split in half). However, the total value of your Tesla stock is still \$100 (2 shares multiplied by a \$50 price per share). Think of stock splits like cutting a cake — after cutting a cake in half, the cake is still the same size, just split in half.
We have to adjust stock prices for stock splits so that we accurately calculate gains (profits) and losses on trades over time since Senators can buy and sell stocks at vastly different prices if companies split their stocks. Adjusting stock prices for stock splits leads to an apples-to-apples comparison between stock prices for the same company at different points in time.
# Adjust share prices to reflect stock splits. The adjustment factor on a date is the amount that we divide share prices on that
# date by to reflect the cumulative effect of stock splits.
compustat['adj_close'] = compustat['close'] / compustat['adjustment_factor']
compustat['adj_high'] = compustat['high'] / compustat['adjustment_factor']
compustat['adj_low'] = compustat['low'] / compustat['adjustment_factor']
compustat['adj_open'] = compustat['open'] / compustat['adjustment_factor']
Since Compustat won't have every ticker that we want, let's find the tickers that we reformatted that it has, and the tickers that we reformatted that it doesn't have. We'll have to exclude the tickers that Compustat doesn't have from our analysis, although they shouldn't have a big impact since there are only a few of them.
print("Changed tickers: " + str(changed_tickers) + "\n")
print("Found:")
for key in changed_tickers:
if not compustat.loc[compustat['ticker'] == changed_tickers[key]].empty or not compustat.loc[compustat['ticker'] == key].empty:
print(changed_tickers[key])
print("\nNOT found:")
for key in changed_tickers:
if compustat.loc[compustat['ticker'] == changed_tickers[key]].empty and compustat.loc[compustat['ticker'] == key].empty:
print(changed_tickers[key])
Changed tickers: {'HUB-B': 'HUB.B', 'COF-PP': 'COF', 'XLS-WI': 'XLS.WI', 'BUNT-RP': 'BUNT', 'SBUX.SW': 'SBUX', 'ADT.F': 'ADT.F', 'RDS-B': 'RDS.B', 'SYY.SG': 'SYY', 'BRK-B': 'BRK.B', 'UA-C': 'UA', 'NEE-PC': 'NEE.PC', 'ZNGA.SW': 'ZNGA', 'RDS-A': 'RDS.A', 'IBM.MX': 'IBM', 'MSTY.PA': 'MSTY.PA', 'LGF-B': 'LGF.B', 'LM09.SG': 'LM09', 'RDSA.AS': 'RDSA', '0QZI.IL': '0QZI', '3V64.TI': '3V64'}
Found:
COF
BUNT
SBUX
RDS.B
SYY
BRK.B
UA
NEE.PC
ZNGA
RDS.A
IBM
LGF.B
NOT found:
HUB.B
XLS.WI
ADT.F
MSTY.PA
LM09
RDSA
0QZI
3V64
Among the tickers that we didn't reformat, Compustat may not have some of them, either. We'll have to exclude those tickers from our analysis, too. Let's identify them in case they give us errors when we construct our portfolio and index. We conjecture that Compustat may not have some of these tickers since they're no longer publicly traded for reasons including "going private" (e.g., YHOO (Yahoo), which is now a privately-owned company), going bankrupt, being acquired by another company, etc. A major difficulty that anyone will run into when they try to analyze past stock data is dealing with companies whose stocks no longer trade publicly.
senate_data['ticker'] = senate_data['ticker'].str.replace("-",".")
senate_data_tickers = senate_data.ticker.unique()
compustat_tickers = compustat.ticker.unique()
compustat_extra_tickers = [ticker for ticker in compustat_tickers if ticker not in senate_data_tickers]
print("Extra tickers from Compustat: " + str(len(compustat_extra_tickers)))
print("Those tickers listed: " + str(compustat_extra_tickers))
print("Length of list: " + str(len(compustat_extra_tickers)))
senate_data_tickers_extra_tickers = [ticker for ticker in senate_data_tickers if ticker not in compustat_tickers]
print("Tickers in senate_data not found in Compustat (likely many mutual funds): " + str(len(senate_data_tickers_extra_tickers)))
print("Those tickers listed: " + str(senate_data_tickers_extra_tickers))
print("Length of list: " + str(len(senate_data_tickers_extra_tickers)))
Extra tickers from Compustat: 630 Those tickers listed: ['AAMRQ', 'AALCP', 'HON.WI', 'AEP.PA', 'AEPPL', 'AEPPZ', 'AIG.WS', 'AIG.PA', 'APA.PD', 'ATROB', 'BK.PC', 'ABX.', 'BDXA', 'BDXB', 'BRK.A', 'BIO.B', 'BAM.A', '4975B', 'BAM.PR.C', 'BAM.PR.B', 'BAM.PR.E', 'BAM.PR.G', 'BAM.PR.I', 'BAM.PR.J', 'BAM.PR.K', 'BAM.PR.L', 'BAM.PR.M', 'BAM.PR.N', 'BAM.PR.O', 'BAM.PR.P', 'BAMGF', 'BAM.PR.R', 'BAMKF', 'BAM.PR.T', 'BAM.PR.X', 'BAM.PR.Z', 'BAM.PF.A', 'BAM.PF.B', 'BAM.PF.C', 'BAM.PF.D', 'BAM.PF.E', 'BAM.PF.F', 'BAM.PF.G', 'BAM.PF.H', 'BMKAF', 'BAM.PR.S', 'BAM.PF.I', 'BAM.PF.J', 'BMYMP', 'CELG.R', 'T.', 'TU.2', 'T.A', 'BP.U', 'CP.', 'STZ.B', 'JPM.PJ', 'JPM.PK', 'JPM.PI', 'JPM.PF', 'JPM.PM', 'JPM.PD', 'JPM.WS', 'JPM.PD.1', 'JPM.PG', 'JPM.PA', 'JPM.PC', 'JPM.PH', 'JPM.PB', 'JPM.PE', 'JPM.PL', 'CLV', 'CCZ', 'CMA.WS', 'C.PI', 'C.PP', 'C.PM', 'C.PH', 'CGBBW', 'C.WA', 'C.PC', 'C.PJ', 'C.PK', 'C.PL', 'C.PS', 'TAP.Z.', 'TAP.A', 'TAP.Z', 'CFR.PA', 'CFR.PB', 'DHR.PA', 'DHR.PB', 'DTV', 'DTP', 'DCUA', 'DCUB', 'DCUD', 'DCUE', 'DUK.PA', '4847B', 'NEE.PO.1', 'NEE.PP.1', 'NEE.PQ.1', 'NEE.PR', 'NEE.PP', 'NEE.PO', 'NEE.PQ', 'FRT.PC', 'FITBP.', 'FITBI', 'FITBP', 'FITBO', 'RF.PA', 'RF.PB', 'RF.PC', 'RF.PE', 'FMER.PA', 'MTB.PC', 'MTB.P', 'MTB.WS', 'USB.PH', 'USB.PL', 'USB.PA', 'USB.PM', 'USB.PN', 'USB.PO', 'USB.PP', 'USB.PR', 'USB.PQ', 'F.PA', 'F.WS', 'GMM.U', 'GM.PB', 'GM.WB', 'GM.WA', 'GM.WC', 'GLAXF', 'HEI.A', 'HNZ', 'HNZPP', '4741B', 'HLNQ', 'HUBSP', 'HBANO', 'HBANN', 'HBANP', 'HBANM', 'ENB.', 'ENB.PR.A', 'EBRGF', 'ENB.PR.B', 'EBRZF', 'ENB.PR.D', 'ENB.PR.F', 'ENB.PR.H', 'ENBBF', 'ENB.PR.U', 'EBBNF', 'ENB.UN', 'ENB.PR.N', 'ENB.PR.P', 'ENB.PR.T', 'ENB.PR.V', 'ENB.PR.Y', 'EBGEF', 'ENB.PF.V', 'ENB.PR.J', 'ENB.PF.A', 'ENB.PF.C', 'ENB.PF.E', 'ENB.PF.G', 'ENB.PF.I', 'EBPPF', 'ENB.PR.C', 'ENB.PF.K', 'KMI.WS', 'KMI.PA', 'KSU.P', 'LNC.P', 'LNC.WS', 'MG.', 'MKC.V', 'MRK.WI', 'MDPEB', 'IKR', 'BAC.PD', 'BAC.PE', 'BAC.PI', 'BAC.PJ', 'BAC.PL', 'BAC.PH', 'BML.PG', 'BML.PH', 'BML.PI', 'BML.PJ', 'BML.PL', 'BML.PN', 'BML.PO', 'BML.PQ', 'BAC.WB', 'BAC.WA', 'BAC.PW', 'BAC.PY', 'BAC.PC', 'BAC.PA', 'BAC.PB', 'BAC.PK', 'MER.PK', 'BAC.PM', 'BAC.PN', 'BAC.PO', 'BAC.PP', 'BAC.PQ', '4764B', 'XCJ', 'WFC.PJ', 'WFC.PL', 'WFC.WS', 'WFC.PN', 'WFC.PO', 'WFC.PP', 'WFC.PQ', 'WFC.PR', 'WFC.PT', 'WFC.PV', 'WFC.PW', 'WFC.PX', 'WFC.PY', 'WFC.PZ', 'WFC.PA', 'WFC.PC', 'WFC.PD', 'OXY.WT', 'SRE.PA', 'SRE.PB', 'PPL.PU', 'PPL.PW', 'PE.PA', 'PE.PB', 'PE.PC', 'PE.PD', 'PLP.Z', 'KEY.PG', 'KEY.PH', 'KEY.PI', 'KEY.PJ', 'KEY.PK', 'SOLN', 'T.PA', 'T.PC', 'SWNC', 'STT.PC', 'STT.PD', 'STT.PE', 'STT.PG', 'PSA.PN', 'PSA.PK', 'PSA.PQ', 'PSA.PO', 'PSA.PJ', 'PSA.PW.1', 'PSA.PX.1', 'PSA.PZ.1', 'PSA.PA.1', 'PSA.PD.1', 'PSA.PF.2', 'PSA.PI', 'PSA.PG', 'PSA.PO.1', 'PSA.PP.1', 'PSA.PM', 'PSA.PQ.2', 'PSA.PL', 'PSA.PR', 'PSA.PS', 'PSA.PT', 'PSA.PH', 'PSA.PU', 'PSA.PV', 'PSA.PW', 'PSA.PX', 'PSA.PY', 'PSA.PZ', 'PSA.PF', 'PSA.PA', 'PSA.PP', 'PSA.PB', 'PSA.PC', 'PSA.PD', 'PSA.PE', 'STI.PA', 'STI.WB', 'STI.WA', 'STI.PE', 'TRP.', 'TCA.PR.X', 'TCA.PR.Y', 'TRP.PR.A', 'TRPEF', 'TRP.PR.B', 'TCANF', 'TRP.PR.C', 'TRP.PR.D', 'TRP.PR.E', 'TNCAF', 'TRP.PR.F', 'TRP.PR.G', 'TRP.PR.H', 'TRP.PR.I', 'TRP.PR.J', 'TRP.PR.K', '6525B', 'TSNU', '1974B', 'WY.PA', 'Z.1', 'BBT.PD', 'BBT.PE', 'TFC.PF', 'TFC.PG', 'TFC.PH', 'TFC.PI', 'TFC.PO', 'TFC.PR', 'FMBIP', 'FMBIO', 'AEUA', 'BEM', 'RYDAF', 'RYDBF', 'ATUS', 'CMO.PA', 'CMO.PB', 'CMO.PE', 'BHPLF', 'BRY.1', 'CELGZ', 'VIACA', 'VIACP', 'ZTS.WI', 'SCHW.PB', 'SCHW.PC', 'SCHW.PD', 'SCHWL', 'SJR.B', 'SJRWF', 'SJR.A', 'SJR.PR.A', 'SJR.PR.B', 'LVMHF', 'DELL.1', 'DELL', 'SU.', 'HSEA', 'HSBC.PA', 'HSEB', 'BNPZY', 'TD.', 'TD.PR.O', 'TD.PS', 'TD.PY', 'TD.PA', 'TD.PR.C', 'TD.PE', 'TD.PG', 'TD.PI', 'TD.PK', 'TD.PR.P', 'TD.PR.Q', 'TD.PR.R', 'TD.PR.T', 'TD.PR.Z', 'TD.PF.A', 'TNTTF', 'TD.PF.B', 'TD.PF.C', 'TDBKF', 'TD.PF.D', 'TD.PF.E', 'TD.PF.F', 'TNTOF', 'TD.PF.G', 'TD.PF.H', 'TD.PF.I', 'TD.PF.J', 'TD.PF.K', 'TD.PF.L', 'TD.PF.M', 'PBCTP', 'SIGIP', 'SIVBP', 'FFBCW', 'TMUSP', 'CWEN.A', 'SABRP', 'TOYOF', 'RYAM.PA', 'MDZ.A', 'PAAS.', 'SYF.PA', 'CFG.PD', 'CFG.PE', 'LMRKP', 'LMRKO', 'LMRKN', 'SHOP.', 'IBKCP', 'IBKCO', 'IBKCN', 'OFC.PG', 'OFC.PH', 'OFC.PJ', 'OFC.PL', 'RHHBF', 'FTV.PA', 'BBU.UN', 'CHKAQ', 'CHKLQ', 'CHKVQ', 'CHKEL', 'CHKEW', 'CHKEZ', 'AGN.PA', 'AGU.', 'AZNCF', 'ALL.PA', 'ALL.PC', 'ALL.PD', 'ALL.PE', 'ALL.PF', 'ALL.PG', 'ALL.PH', 'ALL.PI', 'LGF.A', '7153B', 'SGY.1', 'SGY.WS', 'GMCR', 'PRE.PC', 'PRE.PD', 'PRE.PE', 'PRE.PF', 'PRE.PG', 'PRE.PH', 'PRE.PI', 'PREPR.J', 'SPG.PJ', 'PLD.PL', 'PLD.PM', 'PLD.PO', 'PLD.PP', 'PLD.PS', 'PLD.PR', 'ADC.PA', 'GDI.2', 'ESS.PH', 'AIV.PU', 'AIV.PZ', 'AIV.PA', 'O.PE', 'O.PF', 'COF.WS', 'COF.PP', 'COF.PC', 'COF.PD', 'COF.PF', 'COF.PG', 'COF.PH', 'COF.PI', 'COF.PJ', 'COF.PK', 'COF.PL', 'COF.PN', 'BHFAP', 'BHFAO', 'BHFAN', 'BHFAM', 'SI.PA', 'NKLAW', 'DGNR.U', 'DGNR.WS', 'TRITW', 'LMACA', 'LMACW', 'DMYQ.U', 'PL.WS', 'NRDY.WS', '9166B', 'GTI', 'HIG.PA', 'HIG.WT', 'HIG.PG', 'SRCLP', 'ARE.PD', 'ARE.PE', 'RBA.', 'EPR.PC', 'EPR.PD', 'EPR.PE', 'EPR.PF', 'EPR.PG', 'MGRD', 'GCVRZ', 'AMT.PA', 'AMT.PB', 'KL.', 'WCN.', 'CCI.PA.', 'CCI.PA', 'GS.PI', 'GS.PJ', 'GS.PK', 'GS.PN', 'AQN.', 'AQN.PR.A', 'AGQPF', 'AQN.PR.D', 'APTV.PA', 'PPL.', 'PBNAF', 'PPL.PR.A', 'PPL.PR.C', 'PPL.PR.E', 'PMBPF', 'PPL.PR.G', 'PPL.PR.I', 'PPL.PR.K', 'PPL.PR.M', 'PPL.PR.O', 'PPL.PR.S', 'PPL.PR.Q', 'PPL.PF.A', 'PFL.PF.C', 'PPL.PF.E', 'MET.PA', 'MET.PB', 'MLU', 'MET.PE', 'MET.PF', 'CEF.', 'MAXR.', 'ETP.PC.1', 'ETP.PD.1', 'GLADP', 'GLADO', 'GLADN', 'ANTX', 'CIT.PB', 'TCBIW', 'TCBIP', 'TCBIO', 'AXS.PA', 'AXS.PC', 'AXS.PD', 'AXS.PE', 'AIZP', '2091B', 'LBTYB', 'DLR.PE', 'DLR.PF', 'DLR.PG', 'DLR.PH', 'DLR.PI', 'DLR.PJ', 'DLR.PC', 'DLR.PK', 'DLR.PL', 'BMR.PA', 'MCLPL', 'CEQP.P', 'WAL.PA', 'DISCB', 'QSR.', 'ROLLP', 'DCP.PB', 'DCP.PC', 'ET.PE', 'ET.PD', 'ET.PC', 'VIA.1', 'AFSIA', 'AFSI.PB', 'AFSI.PC', 'AFSI.PD', 'AFSI.PE', 'AFSI.PF', 'QRTEB', 'CYS.PA', 'CYS.PB', 'NGLS.PA', 'DFS.PB', 'VR.PA', 'VR.PB', 'LLL.', 'HTS.PA', '0050B', '0051B', 'SWI.3', 'AVGOP', 'TWO.WS', 'TWO.PA', 'TWO.PB', 'TWO.PC', 'TWO.PE', 'TWO.PD', 'PEB.PA', 'PEB.PB', 'PEB.PC', 'PEB.PD', 'PEB.PE', 'PEB.PF', 'PEB.PG', 'PEB.PH', 'APO.PA', 'APO.PB', 'COR.PA', 'STAG.PA', 'STAG.PB', 'STAG.PC', 'CMRE.PB', 'CMRE.PC', 'CMRE.PD', 'CMRE.PE', 'AL.PA', 'WPXP', 'TCGP', 'SFTBF', 'RBGPF', 'BUDFF', 'ECP.'] Length of list: 630 Tickers in senate_data not found in Compustat (likely many mutual funds): 89 Those tickers listed: ['SYMC', 'NSRGY', 'ACE', 'VRX', 'JPJQL', 'ZMH', 'WIN', 'UTX', 'KORS', 'LINE', 'PWE', 'YHOO', 'CLNY', 'JCOM', 'LGP', 'LMGEX', 'TCAP', 'DVFAX', 'BTE', 'HRS', 'HUB.B', 'MLPRX', 'PGH', 'FEYE', 'ISIS', 'MFCDX', 'MDDVX', 'WASCX', 'TOLLX', 'ESV', 'HYH', 'COH', 'CBS', 'XLS.WI', 'AKRX', 'AMSG', 'CMN', 'CYBX', 'PLT', 'MYL', 'ETE', 'PRPFX', 'NGIPX', 'MSACX', 'PCLN', 'VADDX', 'MGEMX', 'VSMIX', 'ACSDX', 'WSTMX', 'VMIIX', 'VNR', 'LGCY', 'ADT.F', 'YACKX', 'CTL', 'DPM', 'IRET', 'WTR', 'TMK', 'WTW', 'XON', 'BRKB', 'TLLP', 'LB', 'POT', 'VEVIX', 'Q', 'MCC', 'PHLD', 'NPSND', 'PDRDY', 'SMECF', 'DWDP', 'BOIVF', 'MSTY.PA', 'LM09', 'FCNTX', 'FLMVX', 'PRNHX', 'TOT', 'RDSA', '0QZI', '3V64', 'TGBAX', 'VFIJX', 'CAIFX', 'FRIAX', 'FDSWX'] Length of list: 89
stocks_historic_close = {} # This is a dictionary, by date, of a dictionary, by ticker, of (of a dictionary of) all stocks' closing prices.
stocks_historic_open = {} # the same, but for opening prices
stocks_historic_high = {} # the same, but for highs
stocks_historic_low = {} # the same, but for lows
stocks_historic_TDRF = {} # the same, but for the total daily return factor
trading_dates = np.sort(compustat['trading_date'].unique())
stocks_historic_close = compustat.groupby('trading_date').apply(lambda x: dict(zip(x.ticker, x.adj_close))).to_dict()
stocks_historic_open = compustat.groupby('trading_date').apply(lambda x: dict(zip(x.ticker, x.adj_open))).to_dict()
stocks_historic_high = compustat.groupby('trading_date').apply(lambda x: dict(zip(x.ticker, x.adj_high))).to_dict()
stocks_historic_low = compustat.groupby('trading_date').apply(lambda x: dict(zip(x.ticker, x.adj_low))).to_dict()
stocks_historic_TDRF = compustat.groupby('trading_date').apply(lambda x: dict(zip(x.ticker, x.total_return_factor))).to_dict()
stocks_historic_sector = compustat.groupby('trading_date').apply(lambda x: dict(zip(x.ticker, x.gsector))).to_dict()
# Grouping all of these dictionaries into one big nice dictionary:
stocks_historic_data = {'close': stocks_historic_close, 'open': stocks_historic_open, 'high': stocks_historic_high, 'low': stocks_historic_low, 'TDRF': stocks_historic_TDRF, 'sector': stocks_historic_sector}
transactions_by_senator = {} # This is a dictionary list, by senator, of dataframes of stock transactions.
senators = senate_data.senator.unique()
for senator in senators:
transactions_by_senator[senator] = senate_data[senate_data['senator'] == senator]
remove = []
for index in range(len(trading_dates)):
# This is a rough way of excluding non-days (like holidays), but it works.
if (stocks_historic_data['close'][pd.Timestamp(trading_dates[index])].get('AAPL') == None):
remove.append(index)
trading_dates = np.delete(trading_dates, remove)
# Only use tickers from the Compustat data (this excludes some of the tickers from the senate data unfortunately).
senate_data_tickers = [ticker for ticker in senate_data_tickers if ticker not in senate_data_tickers_extra_tickers]
for ticker in senate_data_tickers_extra_tickers:
senate_data = senate_data[senate_data['ticker'] != ticker]
senators = senate_data['senator'].unique()
print("Number of senators trading stocks in the data: " + str(len(senators)))
# Different types of trade executions for generating different types of indicies.
@unique
class trade_execution(Enum):
CLOSE_TO_CLOSE = 0
WORST_CASE = 1
BEST_CASE = 2
#execution = trade_execution.CLOSE_TO_CLOSE,
def index_calculator(index_start = 100.0, senators_equally_weighed = False, begin_date = 0, end_date = -1, date_column = "transaction_date", selected_senators = senators):
# index_start is like as if someone put in that amount of money in the index to start with
# begin_date and end_date are indicies in the trading_dates list which will select that range
# senators_equally_weight is a boolean variable which tells whether each senator's holdings should be equally weighed or not
# not being equally weighed is the default, of course, and this treats the whole senate as one big portfolio
# THE PARAMETER, execution, BELOW HAS NOT BEEN ADDED YET
# execution may be three values for how purchase and sales are handled:
# CLOSE_TO_CLOSE is the default where the closing price is used on purchase and sale
# WORST_CASE is where the trades are purchased at the high of the day and sold at the low of the day
# BEST_CASE is where the trades are purchased at the low of the day and sold at the high of the day
# date_column is for selecting the dates column in the senate_data dataframe when transactions occur
# basically, one could leave it the default "transaction_date" and everything happens as if the senate is trading,
# but if one wanted to see how well they would do mimicking the senate as they see what they do, then they would
# want to use the disclosure_date (when the trade was disclosed to the public)
# selected_senators is the list of senators looked at when creating an index
if ((not isinstance(index_start, float) and not isinstance(index_start, int)) or index_start <= 0
or not isinstance(begin_date, int) or not isinstance(end_date, int) or (end_date != -1 and begin_date < end_date) or begin_date < -1 or end_date < -1
or begin_date > len(trading_dates) or end_date > len(trading_dates)
or (senators_equally_weighed != False and senators_equally_weighed != True)
or (date_column != "transaction_date" and date_column != "disclosure_date")
or (not isinstance(selected_senators, np.ndarray) and not isinstance(selected_senators, list)) or selected_senators == []):
# This if statement detects possible problematic input to the function and raises an exception if so
# or not isinstance(execution, trade_execution)
raise Exception("Invalid arguments passed to " + str(inspect.currentframe().f_code.co_name))
selected_trading_dates = trading_dates[begin_date:end_date] # selects trading dates based on the arguments
days_until_first_trade = 0 # how many days after the first date until the first day with a Senate purchase transaction
big_gains_losses = pd.DataFrame(columns=['date', 'index_today', 'index_yesterday', 'gain', 'current_holdings']) # debug variable
level = pd.DataFrame(columns=['date', 'index_today', 'index_yesterday', 'current_holdings']) # debug variable
holdings_by_day = [] # list of holdings as each day passes
gain_loss_by_day = [] # list of gain or loss factor for each day
index_by_day = [] # index list
current_holdings = {} # current holdings by ticker (in cash)
shares_by_senator = {} # current shares by senator by ticker
# first day:
holdings_by_day.append(0) # initialization
gain_loss_by_day.append(0.00) # initialization
index_by_day.append(index_start) # initialization
# Set initial shares to 0 for all senators
for senator in selected_senators:
shares_by_senator[senator] = {}
for ticker in senate_data_tickers:
shares_by_senator[senator][ticker] = 0
for ticker in senate_data_tickers:
current_holdings[ticker] = 0
current_year = selected_trading_dates[days_until_first_trade].astype('M8[Y]')
# sectors are numbered 10.0 through 60.0 by 5s or nan if no value
purchases_by_year = {} # total purchases and purchases by sector by calender year
purchases_by_year[current_year] = {'total': 0, 'by_sector': {'10.0': 0, '15.0': 0, '20.0': 0, '25.0': 0, '30.0': 0, '35.0': 0, '40.0': 0, '45.0': 0, '50.0': 0, '55.0': 0, '60.0': 0, 'nan': 0}}
annual_return = {} # annual return factor by calender year
annual_return[current_year] = 1.0
purchase_sell_errors = [] # debug variable
other_access_errors_by_day = [] # debug variable
for date in selected_trading_dates:
today_errors = "|"; # debug variable
if (current_year != date.astype('M8[Y]')): # this if statement and bit of code is in case the first day starts the next calender year
current_year = date.astype('M8[Y]')
annual_return[current_year] = 1.0
purchases_by_year[current_year] = {'total': 0, 'by_sector': {'10.0': 0, '15.0': 0, '20.0': 0, '25.0': 0, '30.0': 0, '35.0': 0, '40.0': 0, '45.0': 0, '50.0': 0, '55.0': 0, '60.0': 0, 'nan': 0}}
current_transactions = senate_data[(senate_data[date_column] == date) & (senate_data['transaction_type'] == "Purchase")]
num_actual_transactions = 0 # this variable is in case selected_senators does not include all senators and transactions are ignored below due to this
for row, row_str in current_transactions.iterrows():
ticker = current_transactions.loc[row, 'ticker']
senator = current_transactions.loc[row, 'senator']
if (senator not in selected_senators):
continue
amount = current_transactions.loc[row, 'lower_bound_amount']
date = current_transactions.loc[row, date_column]
if (stocks_historic_data['close'][pd.Timestamp(date)].get(ticker) == None):
today_errors += (str(ticker) + " at " + str(date) + "|") # for debug
continue
num_actual_transactions += 1
# shares are based off of the price at that day's close
shares = amount/(stocks_historic_data['close'][pd.Timestamp(date)][ticker])
shares_by_senator[senator][ticker] += shares
holdings_by_day[0] += amount
current_holdings[ticker] += amount
purchases_by_year[current_year]['total'] += amount
gsector = str(stocks_historic_data['sector'][pd.Timestamp(date)][ticker])
purchases_by_year[current_year]['by_sector'][gsector] += amount
if (len(other_access_errors_by_day) > 0 or len(current_transactions) > 0):
# This if statement adds any errors when scanning through trades to the list of access errors
other_access_errors_by_day.append(today_errors)
days_until_first_trade+=1
if (num_actual_transactions > 0):
# Once at least one valid transaction occurs, this whole loop breaks
days_until_first_trade-=1
break
# second day onward:
for date_index in range((days_until_first_trade+1), len(selected_trading_dates[(days_until_first_trade+1):])):
if (current_year != selected_trading_dates[date_index].astype('M8[Y]')): # this if statement is for calender year changes
current_year = selected_trading_dates[date_index].astype('M8[Y]')
annual_return[current_year] = 1.0
purchases_by_year[current_year] = {'total': 0, 'by_sector': {'10.0': 0, '15.0': 0, '20.0': 0, '25.0': 0, '30.0': 0, '35.0': 0, '40.0': 0, '45.0': 0, '50.0': 0, '55.0': 0, '60.0': 0, 'nan': 0}}
date = pd.Timestamp(selected_trading_dates[date_index])
date_yesterday = pd.Timestamp(selected_trading_dates[date_index-1])
#print(date) # for debug
#print(index_by_day[date_index-(days_until_first_trade+1)]) # for debug
# first calculate gains of current stocks
today_errors = "|"; # debug variable
prev_holdings = sum(current_holdings.values())
data_today = stocks_historic_data['close'][date] # closing prices today
data_yesterday = stocks_historic_data['close'][date_yesterday] # closing prices yesterday
#data_today_high = stocks_historic_data['high'][date]
#data_yesterday_high = stocks_historic_data['high'][date_yesterday]
#data_today_low = stocks_historic_data['low'][date]
#data_yesterday_low = stocks_historic_data['low'][date_yesterday]
for ticker in senate_data_tickers:
if (current_holdings[ticker] > 0):
price_today = None
price_yesterday = None
if ((data_today.get(ticker) != None) and (data_yesterday.get(ticker) != None)):
price_today = data_today[ticker]
price_yesterday = data_yesterday[ticker]
else:
today_errors += (str(ticker) + " at " + str(date) + "|") # for debug
if ((price_today != None) and (price_yesterday != None) and (not math.isnan(price_today)) and (not math.isnan(price_yesterday))):
current_holdings[ticker] *= (price_today/price_yesterday) # Multiply by change in holding value from last close to today's close
senators_gain_loss_today = []
if (senators_equally_weighed):
# This is strictly when the index is weighing senators equally:
for senator in selected_senators:
senator_prev_holdings = 0
senator_after_holdings = 0
senator_shares = sum(shares_by_senator[senator].values())
if (senator_shares == 0):
continue
for ticker in senate_data_tickers:
if (shares_by_senator[senator][ticker] > 0):
price_today = None
price_yesterday = None
if ((data_today.get(ticker) != None) and (data_yesterday.get(ticker) != None)):
price_today = data_today[ticker]
price_yesterday = data_yesterday[ticker]
if ((price_today != None) and (price_yesterday != None) and (not math.isnan(price_today)) and (not math.isnan(price_yesterday))):
# This calculates the current senator's value for the previous day and the current day to get a gain or loss later
senator_prev_holdings = price_yesterday*shares_by_senator[senator][ticker]
senator_after_holdings = price_today*shares_by_senator[senator][ticker]
if (senator_prev_holdings != 0 and senator_after_holdings != 0):
# This adds the gain or loss of the current senator to a list which is averaged later
senators_gain_loss_today.append(senator_after_holdings/senator_prev_holdings)
holdings_by_day.append(sum(current_holdings.values()))
if (not senators_equally_weighed):
gain_loss_by_day.append(holdings_by_day[-1]/prev_holdings)
else:
gain_loss_by_day.append(gain_loss_by_day[-1])
if (len(senators_gain_loss_today) != 0):
gain_loss_by_day[-1] = sum(senators_gain_loss_today)/len(senators_gain_loss_today)
#print(gain_loss_by_day[-1]) # for debug
index_by_day.append(index_by_day[-1]*gain_loss_by_day[-1]) # After the unrealized profit or loss is calculated it is applied to the last index value
annual_return[current_year]*=gain_loss_by_day[-1]
# the two if statements below are for debugging
if (gain_loss_by_day[-1] >= 1.05 or gain_loss_by_day[-1] <= 0.95): # tracking big gains and losses to find possible bugs later
big_gains_losses.loc[len(big_gains_losses)] = [date, index_by_day[-1], index_by_day[-2], ((gain_loss_by_day[-1]-1)*100), current_holdings]
if (gain_loss_by_day[-1] == 1.00): # tracking level days to find possible bugs later
level.loc[len(level)] = [date, index_by_day[-1], index_by_day[-2], current_holdings]
# add valid purchases to holdings
purchase_transactions = senate_data[(senate_data[date_column] == date) & (senate_data["transaction_type"] == "Purchase")]
for row, row_str in purchase_transactions.iterrows():
ticker = purchase_transactions.loc[row, 'ticker']
senator = purchase_transactions.loc[row, 'senator']
if (senator not in selected_senators):
continue
amount = purchase_transactions.loc[row, 'lower_bound_amount']
if (data_today.get(ticker) != None):
shares = amount/(data_today[ticker])
else:
#print("Purchase error: " + str(ticker) + " at " + str(date)) # for debug
purchase_sell_errors.append("Purchase error: " + str(ticker) + " at " + str(date)) # for debug
continue
shares_by_senator[senator][ticker] += shares
holdings_by_day[-1] += amount
current_holdings[ticker] += amount
purchases_by_year[current_year]['total'] += amount
gsector = str(stocks_historic_data['sector'][date][ticker])
purchases_by_year[current_year]['by_sector'][gsector] += amount
# match sells to previous buys, then deduct them if sensible
# this part is a bit more tricky
# the sells match previous buys of the same senator by looking at that senator's shares in that stock
sell_transactions = senate_data[(senate_data[date_column] == date) & (senate_data['transaction_type'] != "Purchase")]
for row, row_str in sell_transactions.iterrows():
ticker = sell_transactions.loc[row, 'ticker']
amount = sell_transactions.loc[row, 'lower_bound_amount']
senator = sell_transactions.loc[row, 'senator']
if (senator not in selected_senators):
continue
transaction_type = sell_transactions.loc[row, 'transaction_type']
if (data_today.get(ticker) != None):
shares = amount/(data_today[ticker])
else:
#print("Sell error: " + str(ticker) + " at " + str(date)) # for debug
purchase_sell_errors.append("Sell error: " + str(ticker) + " at " + str(date)) # for debug
continue
if (transaction_type == "Sell (Partial)" and shares_by_senator[senator][ticker] > shares):
current_holdings[ticker] -= amount
shares_by_senator[senator][ticker] -= shares
elif ((transaction_type == "Sell (Full)" or transaction_type == "Sell (Partial)") and shares_by_senator[senator][ticker] > 0):
# if a partial sale happens to exceed the holdings of a senator, then the senator's position is cleared
current_holdings[ticker] -= (shares_by_senator[senator][ticker])*(data_today[ticker])
shares_by_senator[senator][ticker] = 0.00
#print("Errors: " + today_errors) # for debug
other_access_errors_by_day.append(today_errors)
print("Index list: " + str(index_by_day))
# return huge object of data
return {'index_by_day': index_by_day, 'purchases_by_year': purchases_by_year, 'annual_return': annual_return, 'days_until_first_trade': days_until_first_trade, 'holdings_by_day': holdings_by_day, 'gain_loss_by_day': gain_loss_by_day, 'debug': {'purchase_sell_errors': purchase_sell_errors, 'other_access_errors_by_day': other_access_errors_by_day, 'big_gains_losses': big_gains_losses, 'level': level}}
Number of senators trading stocks in the data: 46
As more data was being extracted from the data set and as the calculator above was being improved sometimes index calculations would shift quite a bit. Small changes in precision would sometimes lead to somewhat big differences in outcome, but this index calculator is a lot more precise than in the beginning. It seems that it becomes less accurate as time goes on as not everything in the stock market is taken into account with it like when companies are acquired, merged, or go private.
default_senate_calculation = index_calculator()
Index list: [100.0, 102.60897231944001, 99.04549793191218, 98.69551384027999, 98.50461342666243, 98.250079541839, 96.27744193445753, 96.15017499204582, 94.78205536111994, 92.58670060451797, 92.74578428253261, 92.12535793827553, 93.28666878778238, 92.77760101813554, 91.34584791600382, 92.84123448934139, 92.90486796054725, 92.26853324848871, 90.35952911231308, 89.3413935730194, 89.78682787146039, 89.3413935730194, 90.10499522748967, 95.1638561883551, 96.2138084632517, 96.15017499204585, 95.00477251034046, 94.62297168310533, 90.83678014635701, 95.0684059815463, 94.36843779828192, 94.0820871778556, 93.22303531657657, 95.80019090041367, 94.65478841870829, 95.64110722239903, 97.10467706013367, 96.37289214126633, 94.01845370664974, 93.41393573019411, 91.60038180082726, 91.72764874323899, 89.977728285078, 88.73687559656383, 88.25962456251992, 91.56856506522433, 91.60038180082726, 91.69583200763606, 93.47756920139996, 94.12981228125997, 94.52752147629657, 95.0365892459434, 95.45020680878145, 96.05472478523706, 93.22303531657653, 93.20712694877506, 93.82755329303214, 94.30480432707604, 96.40470887686925, 97.39102768055999, 98.79096404708879, 99.10913140311804, 98.72733057588292, 99.96818326439708, 101.24085268851415, 104.32707604199808, 103.18167356029271, 103.37257397391028, 101.78173719376392, 102.38625517021954, 103.1498568246898, 102.19535475660197, 100.60451797645563, 102.86159720012728, 105.15431116767418, 105.47247852370347, 106.99968183264397, 106.87241489023229, 105.31339484568886, 106.58606426980596, 107.6678332803055, 107.73146675151135, 109.0677696468343, 108.46325167037868, 107.0951320394528, 107.57238307349674, 107.5405663378938, 108.01781737193772, 108.43143493477575, 109.54502068087821, 110.0222717149221, 109.51320394527528, 110.49952274896602, 110.11772192173089, 102.44988864142546, 103.6907413299396, 102.22717149220495, 102.79987273305765, 103.49984091632204, 102.44988864142545, 103.14985682468985, 103.34075723830739, 104.23162583518935, 104.9952274896596, 103.37257397391032, 102.32262169901371, 102.44988864142545, 100.66815144766151, 98.12281259942735, 99.8409163219854, 97.48647788736879, 98.28189627744199, 101.2090359529113, 100.92268533248495, 101.20903595291131, 101.55902004454352, 102.44988864142547, 104.07254215717475, 103.40439070951327, 104.26344257079231, 104.9634107540567, 105.75882914412988, 105.66337893732108, 107.12694877505574, 107.57238307349672, 105.85427935093865, 105.59974546611522, 106.3951638561884, 103.34075723830739, 104.2952593063952, 102.73623926185176, 101.81355392936689, 101.11358574610249, 101.30448615972004, 99.80909958638247, 98.47279669105953, 98.63188036907417, 100.00000000000004, 98.31371301304489, 97.6137448297805, 100.03181673560296, 101.27266942411711, 101.3681196309259, 101.0181355392937, 96.02290804963413, 96.30925867006047, 96.40470887686926, 96.02290804963413, 97.20012726694243, 98.60006363347122, 100.73178491886735, 102.35443843461663, 108.08145084314351, 106.33153038498253, 107.76328348711425, 111.29180117338983, 109.05669471208061, 109.58580294542013, 111.16364962172327, 109.5724420918993, 109.32462813674412, 110.41900799800807, 106.3023979746578, 103.76390001458113, 100.86036154853207, 103.07799527571667, 104.0820811759174, 103.12774857462077, 103.86266495573626, 104.0750390048735, 105.75410464308928, 103.56195652852459, 102.42947185777294, 103.4915711542574, 104.75123666922424, 102.11467908847337, 101.43606373953719, 100.30576770257264, 101.05889847446579, 95.8523280339682, 93.07908757683037, 90.57431715866718, 92.24828204074177, 92.3460944425316, 90.11947712940034, 89.83308209507481, 92.67641853105302, 92.3986043956502, 92.02039970020687, 92.01503873231928, 91.39064181969586, 88.5141941238198, 86.61558659822113, 83.60797972051037, 86.25727388513387, 86.12088346389152, 86.83024338283175, 88.32008467150432, 86.98063919708359, 87.03884974061098, 86.51150755414534, 87.49775096022836, 88.6462839539146, 91.80801837273911, 89.05001689792265, 90.97578191311172, 92.24804474391367, 93.10528383064668, 91.53868482497342, 92.65360487543694, 94.80482596284325, 97.41368994663738, 99.17915639922319, 98.64803924306896, 98.03354507879695, 97.1251538754594, 97.22018346761236, 95.41663964317145, 96.4434770675686, 96.44096042110955, 99.18243985645748, 98.29921511771032, 98.2661710387733, 97.6214771169928, 96.56537058334723, 94.1116080317535, 93.72771469345308, 93.22980545372062, 93.51030007306717, 93.09937897365631, 90.06465784918183, 89.14417492600333, 85.98783558407123, 88.19819786326494, 89.07699228238455, 91.84522418052188, 92.10602476400193, 92.65366395962465, 88.63663823624046, 90.67781177148193, 91.42642546676439, 90.78660100041722, 88.16121497715459, 87.34911168919953, 88.71071546929737, 87.21709921093627, 88.30072501814654, 88.71099076761841, 88.5959918412779, 89.35918436076645, 89.88083790437501, 89.93534735796972, 91.51464933558569, 91.65469288969184, 89.73182000857518, 87.6449060639449, 87.99846729580425, 88.40154281707898, 90.59447480287349, 92.56435497252193, 92.02873806220397, 89.36771807045187, 89.25669544631435, 89.67278099956081, 93.16145196118015, 94.222173331934, 95.55642028215055, 94.81426573761892, 94.02912075724569, 96.72165926105608, 100.20283747640643, 102.86334476542903, 103.12989030135222, 106.84311351213022, 106.81711228577467, 108.82049584684158, 105.02476765795916, 107.00365042568315, 104.78171634750791, 103.67849840605399, 102.99335089720675, 104.58965150310276, 106.43000998732109, 107.47270732433597, 106.43151042033368, 105.96341299558216, 106.33597657266964, 103.75098479941795, 105.17126536656394, 103.80849511903786, 105.97392544546427, 103.17688817109014, 106.0219298830731, 105.54084126393778, 109.59462697715615, 108.49591786977517, 111.10741415331793, 111.63451291190795, 110.43077537740463, 111.52649115379558, 111.53099245283333, 112.57118278896458, 112.50566702034627, 110.24423723749612, 111.50597895676088, 109.85617546514123, 107.39168394165625, 109.82265323613481, 109.91066608114804, 113.13029392475451, 112.64472284416935, 113.63692758027969, 112.16213379202142, 112.99628977787455, 114.93067225795036, 116.43796286975606, 118.57189117941132, 121.08650652099125, 120.05842262678765, 119.29651451158128, 121.505009716716, 124.047455132734, 124.2202887795426, 122.85412712646068, 119.24511609118778, 122.4650508180583, 120.34323946200642, 123.3376109991724, 123.38820967782705, 123.17622874471589, 123.66823340379948, 124.73133703631059, 125.97486385036913, 124.06064018905148, 129.54126561259568, 126.64596056849767, 126.42732135228073, 122.91151826870882, 125.59776764448907, 127.42344495345783, 126.258346892492, 123.64706161246724, 122.54073227720312, 122.38021070109903, 123.08662111430543, 124.2267092757029, 120.52934144090867, 116.10001799058192, 114.72411523980851, 113.10719623872755, 117.96788157487325, 119.75163555686122, 120.4333809642764, 120.99923921668535, 120.12435936483554, 121.62894937969706, 121.62585661624661, 122.43438510319172, 121.10146286647498, 122.94958782669133, 124.41904056262408, 125.66429180702535, 125.60919697307192, 125.93976299512502, 124.45307394693819, 124.64587031024153, 123.45080220742857, 123.48776163315237, 123.95549822421064, 124.81665719837477, 124.46635453162297, 124.28348883524852, 123.47449423479378, 123.2380890915528, 120.87287592160796, 120.05937101630333, 122.06459091470674, 122.70970996604548, 121.2370029408717, 121.46569253108508, 120.76883032636485, 119.43501953946783, 119.35361173514964, 119.58129768146091, 119.36164331810093, 120.36118414433159, 121.71136388664172, 123.34056519754637, 123.45839450354697, 122.90993889033565, 120.80089847090551, 118.40992260696733, 118.96890710460274, 121.16437348650773, 118.37811376821554, 117.35355036659472, 118.27479606697979, 118.58432759601689, 119.67660388053353, 119.81706207509012, 120.82575565087427, 122.0403374825389, 121.33924352365642, 121.80656368228078, 121.13438935719353, 120.74041763954895, 121.77355388381582, 120.62453864667314, 121.02889015409026, 120.89177257474329, 121.57262783490062, 120.30996834750427, 120.13715102701237, 120.3398645082585, 120.87970439546979, 122.11248060383495, 122.02588103798186, 121.97724283114385, 120.72358182872789, 121.1084688555816, 121.9130977183914, 121.30122214517598, 122.38441568800279, 122.83802013402729, 123.45705815599544, 124.14437364090675, 124.04189580195732, 124.64609660902698, 124.46806176942819, 124.84349970678922, 125.10030492882743, 125.21516567595971, 125.94285360861605, 127.01845534305292, 126.74353842412995, 127.02636802801054, 126.00157924104965, 124.84551675729207, 124.87034082832639, 125.50652945623958, 126.26291723950726, 126.85873684970544, 126.81299658452119, 126.71632086076889, 126.95443799453732, 126.38120751512051, 126.91314916293054, 127.19922586927983, 127.48213872255857, 127.56347637214516, 128.87749974994625, 129.02394892258158, 129.48494458974497, 129.1052652734617, 127.43747224159, 127.70900356959109, 127.0893697772462, 127.21185427024596, 128.02894015036824, 127.54946454718585, 127.98918978646137, 126.65341596536301, 127.74475454214601, 127.61536382072308, 128.41138736388217, 128.80994593644166, 128.85263138158214, 128.66216868873377, 128.5955068242834, 127.89882332693426, 127.98569341865222, 125.51366380032026, 124.86860203246644, 125.54347229379334, 124.52297619608774, 123.604991769387, 123.51993682456057, 124.67082457813052, 125.52604783992187, 125.00541243456843, 125.87957583425415, 126.57029944714661, 126.50254687729763, 127.60502687239102, 128.22940442990193, 128.63574788926869, 128.64200246027866, 128.28364925417543, 129.0367233914805, 129.17848059322853, 129.33779109458635, 129.1488606299845, 129.38000057034913, 129.4560008659035, 129.44671552449697, 129.04363835522534, 129.34629519422552, 128.80535598591783, 128.35785429787222, 128.81685632628552, 129.03055512868366, 128.182352805156, 127.75065196936654, 128.63423510121788, 129.01767475791758, 129.8778331602229, 129.94203721520395, 128.6314393365321, 127.673653233132, 128.59869077974554, 126.96582582621548, 128.20333404243075, 127.60528692226264, 127.20124975620588, 125.15168758055685, 125.07182879268592, 126.50254535220674, 126.3554709603675, 124.51888034665497, 125.94117542658216, 123.71575984084184, 122.48855050811567, 120.36605286524683, 121.01728901765344, 120.62157831474742, 119.86505169892644, 121.07105292682319, 122.13543159356094, 124.34709869247976, 123.59638622025604, 124.49878249535824, 125.5410852362042, 125.05327098069378, 126.88940169447149, 125.98443994785235, 126.56899657314528, 127.87313157244442, 127.94960642025995, 127.50715941862512, 127.95973071632011, 128.23213791698888, 128.66772914864404, 129.45797611915128, 129.52612031818012, 129.80249547504732, 130.0586741680566, 130.42923525911647, 130.5031461313506, 131.01562263350866, 130.7848369697609, 131.10358726026817, 132.44323782837154, 132.82000453448188, 132.83523317408373, 133.16219959438027, 133.01087694209332, 131.5131162170908, 132.2145634176628, 132.83320191104895, 132.71510009222274, 133.09412123009673, 131.57673709613593, 131.65879973647054, 129.24543017362228, 129.61673716428425, 127.62927519592866, 126.36382295212272, 125.69636406560987, 127.7240668012914, 130.32910100943835, 130.4155745221883, 130.9256291856622, 131.24293818560156, 131.4622350641293, 131.8662226244587, 131.88993209339375, 131.38552200359706, 130.26169600037312, 130.33898544338723, 127.82223544048114, 126.7132122280505, 128.39806957190672, 130.54119186820537, 129.49378094717167, 128.68199628618578, 128.41503220153075, 127.95452815598449, 126.78543947659197, 128.12253812914267, 128.46096664160422, 129.71586485088534, 131.54443831284811, 131.92344410691754, 132.37775431672608, 131.1695540744547, 130.09422713563504, 131.59438046903384, 129.77265930613376, 131.289921778566, 133.1194557030966, 132.05672280694228, 133.0917690367333, 132.2987715836027, 131.91334682891102, 133.36092780311463, 133.4358850285233, 134.8327046753249, 135.89387875425348, 136.0230366565463, 136.39822927543224, 136.3402380148055, 137.56978923282236, 138.01759897060504, 138.26881833372727, 138.08517616723998, 138.61303801389786, 137.87111418304713, 139.3011912559334, 137.60578354735304, 136.7521055776794, 137.02331422143487, 134.48613832869813, 135.9735976955122, 132.77599693675532, 132.34685531626678, 134.51322606172033, 133.1336458401694, 135.79160109704162, 134.30805333483437, 136.13333643098377, 135.52071139958443, 136.20132960091698, 135.93336379475355, 136.02331182405396, 133.17997859717948, 133.04729633531358, 133.75584712048087, 135.79054251747536, 134.88535555625816, 133.05871009375858, 133.33163846712225, 135.37419080292773, 135.90755342677647, 136.0080802764787, 136.46705765659505, 136.78307405739957, 135.8547660916642, 136.02413935005356, 136.42364243329408, 136.12650636610866, 132.95651065237888, 135.13607546361396, 134.74058171490617, 135.27483986961496, 131.67071075336807, 131.26372338043498, 130.52413153621183, 130.81131414703754, 129.7717854272698, 129.17766894172945, 130.25480881169133, 131.25699069594387, 130.2860245495407, 130.00969205171987, 130.75358558739472, 132.37793223288992, 131.85252452486438, 131.94055088321213, 132.84230359366845, 134.32520692409932, 134.52073686799216, 134.26317542164162, 134.43106431875893, 133.57353145517754, 133.72758938076078, 132.91796905767012, 131.75315793586898, 132.92150213126925, 132.78927722811142, 131.37162592914277, 131.32358027624073, 131.3993108663268, 132.2086308609508, 130.77063262827173, 129.8935758281839, 129.42976924414054, 129.71929073044117, 131.409364701941, 132.00945254403655, 130.59548393071208, 128.94877284448245, 129.47802011285413, 129.85734500316477, 131.93212285365846, 131.38803396565064, 132.00526612702282, 132.14895210958883, 130.37967516704364, 129.12514265874026, 129.94965860239338, 127.3281773197343, 127.61103653106204, 128.64799138669503, 128.46213246537243, 128.12258153374825, 128.46325728769276, 126.22279932282488, 127.0522142363053, 128.11663578505025, 129.4350887068927, 129.73764155958688, 129.09470817208606, 130.20909141950546, 129.80229407315448, 130.04995964926187, 129.0659479695442, 128.7224930237421, 124.40265045797034, 124.0599825296148, 123.48053710191141, 125.36263149031515, 125.77855643714403, 125.87581685372166, 125.71294582670924, 124.7266232377666, 124.96317701819221, 125.43513813488708, 124.12052688692309, 123.76005789458868, 125.6900076732314, 123.49855590410773, 123.50685223440834, 122.73970742272873, 123.42905525590061, 124.1672841059886, 123.42323764297464, 121.50707164962543, 119.20889075208565, 117.7392208494478, 114.5258171340423, 113.70636003247303, 117.91960171549192, 119.30541081199378, 119.56712124121027, 117.93365771536666, 114.77285107341784, 116.91568374357114, 117.26182491156902, 115.66804835071177, 118.49109271258551, 116.51635696888103, 116.50787772008115, 116.83533098704588, 116.40755633593743, 118.62938185552441, 119.39925555279662, 118.5026858790772, 115.90380648118145, 116.17608164708136, 114.48760297526806, 114.12523670195947, 114.03801278684124, 115.41567646196691, 114.08442382227564, 116.27199371078144, 116.86904144104854, 116.21886896267766, 118.19897784595732, 120.8219726741683, 120.40269136768255, 121.72159393704429, 123.31262548111634, 123.61220479900157, 123.66183137109815, 122.85336486250344, 122.25587155528599, 122.99447337771427, 122.68686624950863, 122.1916509819426, 122.94010057463352, 123.28995612663762, 127.77031437037179, 127.74905134729168, 128.3001964862731, 128.3095909499879, 129.488379383722, 129.08968442178974, 128.95674761959927, 131.09337834545468, 130.36316120605753, 130.47496350038904, 130.54197191338437, 130.70800258692046, 129.21768250889653, 129.32402157426856, 130.24902542141314, 128.00272432436418, 127.33566226110649, 129.47273572146096, 128.65067338083634, 129.23991057074423, 129.8657275769187, 130.31952330071985, 130.14861962552044, 129.53575870792025, 129.46070513774933, 129.69787057490535, 128.67350698617776, 128.9957167104403, 127.96040849443688, 126.74858889766159, 129.69613561793471, 129.12585624126675, 128.36501725930262, 127.70002877954377, 128.7455340011632, 126.41920776053641, 128.30607481462312, 122.03695208880963, 123.56542986625256, 122.4672882378751, 120.7799248514442, 121.25579066064421, 122.51921678618665, 124.3967261328184, 124.36629960434811, 124.27198009475185, 125.61202634584161, 124.76337190855655, 123.73531947696559, 120.87012309575009, 121.27421949309074, 118.99738191612985, 116.09792655561972, 115.52763799924084, 115.4076230026889, 115.86031265526807, 113.78702554125356, 115.8193684193087, 113.78357375680628, 113.50131347515388, 112.32491386670152, 113.10740481175073, 114.68329009431054, 112.92920882443823, 118.08008765827427, 118.29476415132342, 119.59870178012508, 122.63582884221947, 121.12842917068139, 120.12865952073984, 123.52474260795292, 124.12039853991176, 123.6670277720482, 123.58147291765388, 124.09078912628316, 122.57559338372572, 121.12322767467043, 123.69256408391122, 125.09277695919396, 126.3395244914618, 126.28856769804788, 125.9253450278522, 127.12833098936001, 125.75000323390114, 126.56478969097329, 128.00685413685628, 127.58926546584189, 126.54877045688042, 128.90351806832416, 128.92612475360764, 129.09476311012054, 129.76544604950868, 130.1295099148337, 129.47377356278696, 129.5680566301195, 129.4164534703517, 131.14437160533524, 131.0740248899106, 131.37098107603956, 131.96655764732253, 132.76575855491743, 133.9343974394538, 133.63691138458475, 133.66403418691897, 132.9330670472602, 133.03217752445215, 134.26324609799465, 133.33697401192984, 134.9761177450784, 134.90044561892972, 135.65364377616982, 134.75498368017062, 134.12876274724348, 135.07066253261615, 135.0060571115988, 134.79858836347077, 134.7439831972861, 136.0171662969529, 136.69956561764832, 136.4761691652891, 136.8727000479568, 137.52266453968477, 137.6360416430588, 137.24774152996034, 136.9065083910623, 137.00738129960214, 136.6894978295509, 135.43876172917683, 136.49746661557816, 135.69442818078318, 135.74519638829236, 136.5477685660618, 135.93638622362897, 135.23284675485604, 135.74136304953484, 136.54391607070875, 136.2574481931179, 137.77997633983685, 137.20505315908179, 137.38570401505427, 135.95983363353423, 137.05805179116717, 135.78716972363787, 135.10158688456394, 133.86146851899568, 133.96164387364786, 134.65953317248312, 136.69420459520074, 137.8336918427775, 137.16078054130986, 137.24390702553376, 136.84108112116255, 137.15742342316878, 136.85811931702423, 136.97483753863781, 138.31787658461843, 138.91452470710624, 139.25511700809207, 138.33977034384975, 136.91566003368916, 135.76874812560345, 135.9958396415902, 136.06792072585918, 137.48594799727726, 136.8348412497978, 138.52156694116346, 138.6859767789736, 138.54064633839485, 140.8187859855981, 136.43374436117767, 134.45895209160926, 136.572719127888, 138.36853517883756, 141.0008636937099, 141.4097481213175, 141.0973077902124, 140.93438594843764, 140.7445530587999, 142.6370371869474, 143.26217140266806, 144.38377807844327, 144.3518049919718, 145.5753837951009, 145.8745822950398, 145.76574386017833, 145.64245754478054, 145.96010188399686, 145.1180066401091, 145.35455841664532, 144.75416777172342, 143.61248602560002, 143.87313003838895, 143.68353771023035, 144.02545246716656, 143.8467412180526, 143.71553405448824, 143.9672326222183, 143.5721747150457, 144.4225499567281, 144.45939467892612, 144.26913958695613, 144.44438042764696, 146.08187066864176, 145.6190166596767, 145.94661884861026, 144.96740276298945, 145.40615225615892, 145.09559478856883, 145.31354574628477, 144.8993133126271, 145.4763652628872, 145.03077142304818, 145.15194839852887, 145.0223790381974, 145.84096994530927, 145.57585437785087, 144.83690142720334, 145.3205885007183, 146.0379932662988, 145.91393642393868, 145.47356131445343, 145.63766460209968, 142.04972046330437, 144.020729240627, 142.17395020573318, 141.87747613626846, 142.77047800678596, 141.67727465426267, 142.74680374817342, 143.2820262517219, 144.89453619196826, 145.3303422549758, 143.53424303487708, 142.38575018856596, 142.72766430345766, 143.8494765962858, 142.20159682788147, 143.01762363258803, 142.25963834209435, 139.97002731422015, 140.6991553470876, 140.1975585337648, 139.79887713075874, 139.84736092677747, 138.52822452212092, 138.5226680039412, 138.6360563103446, 138.7619507950801, 138.55670958911685, 138.7378241575965, 138.88852611674045, 138.82413486436212, 138.6260550787707, 139.82026498129622, 136.510004812371, 136.63385449884052, 136.02256931806832, 135.83480180340464, 135.37500879066727, 134.4640185823287, 135.12391868684924, 135.6459988308008, 135.4164611708069, 138.16452260472067, 139.08065566486417, 139.20649646377993, 141.76546675996133, 142.13540220850646, 140.90326119998005, 141.9713174166824, 140.47178676186792, 141.06859057477146, 141.1355577603334, 140.53830267220778, 140.74614949755917, 141.0132526991507, 141.86339981309297, 141.0079528079229, 141.11874921024344, 140.76119492596277, 141.17364509904075, 141.04140945012955, 140.74633914383983, 141.062958084007, 144.10074077187946, 144.08327320246266, 145.85591756759277, 146.38110130295374, 146.05375483156627, 144.35200352511555, 144.1027979962749, 144.88906167094171, 145.33392052496953, 145.7050990517118, 145.5476705412733, 145.95629833979476, 145.7448416254988, 145.97162551445845, 145.091262991122, 145.27373733127246, 145.245380222204, 145.29195840255358, 145.80693395522107, 145.45197143568606, 145.8749900612735, 145.08347560561768, 144.6305183060984, 145.49812601320772, 145.13325114098083, 145.19958642743055, 145.01564477610782, 145.80191952979416, 145.79207269868135, 145.800686598901, 145.7190278919996, 144.5618847411256, 145.28316738612938, 145.20388092736187, 145.51889280975934, 144.02748809529695, 143.67494247472385, 143.8751496241564, 143.23199629792825, 144.05465964249018, 144.065054088702, 144.43823829594493, 145.2291425640044, 146.164262857945, 146.8140815675884, 148.20724570460115, 148.76222213307986, 149.0421707550347, 149.9995458548296, 149.8644251171356, 150.32360371821977, 151.8041012157097, 152.40434295442356, 152.51229992252027, 152.2782255518682, 151.79426736450696, 154.3285128612785, 154.0340076396671, 153.6976430566041, 153.31755476263078, 153.28911782876733, 153.34307502965333, 153.5557136262309, 154.4869906988551, 154.74605904016065, 153.85454115412443, 154.8014390230788, 154.24739661246664, 155.3777451611719, 155.73287912909026, 154.68625389328218, 154.76149362960538, 154.70580503041325, 154.33845865687388, 153.71621587632245, 154.35002418497373, 154.26264734659435, 154.65681914352166, 154.67030856284487, 154.18453202413784, 153.9040059599297, 153.7444627546886, 153.64930978283678, 153.64558079078574, 153.56229935232057, 153.74270408736348, 153.3488051980935, 152.4251324849485, 153.7621710908014, 153.55208164050046, 153.19124584828762, 154.244072244753, 154.3307344264269, 156.38250783526462, 157.306783983244, 157.20258692018672, 157.86560559362684, 157.49223648579755, 156.88275358567066, 157.8718530838834, 158.41082715086512, 159.4721548773689, 159.6719333023091, 159.24552031451202, 158.82462964643057, 158.14636072647784, 158.06703206808731, 157.88981058959695, 158.7199587536861, 158.8126152680864, 156.27670106723787, 156.52410268723546, 157.255132935432, 158.97406812528234, 158.58872575342642, 158.5198133268012, 159.856078758479, 160.47607201773403, 161.39984154535577, 162.5187244047886, 162.80795967903208, 164.2427495227918, 163.86069837807605, 163.26653667399404, 162.95493331649288, 163.45779027485645, 164.11288861016234, 164.29099740663264, 165.48561213069382, 165.8382316700064, 166.42119665657762, 167.60184293716995, 168.00499673281746, 167.70393189299472, 167.34513277777296, 167.04360370828624, 167.6248337932582, 167.5338218987068, 165.55038502405074, 166.40402575679676, 164.49366936734089, 164.86514995724457, 165.95801972063535, 165.80572198376802, 164.35495828535846, 165.54537070302527, 166.17341384717201, 165.68155894206618, 166.9271275462334, 166.90142432716925, 167.56053295171878, 167.52531707923052, 167.47391912860036, 168.23851353866468, 168.39749780499562, 167.71791771438674, 166.9752694508575, 161.20520640564075, 161.02767980033374, 161.58262486739747, 161.31213587905523, 162.09801421306196, 163.23388704644628, 164.4686370185413, 165.5347680528085, 165.6935032144276, 165.60658870867564, 164.85179246217152, 164.81683672840256, 163.98795923369397, 163.92234770067037, 165.06792179023097, 164.89856990593836, 165.41169583571042, 163.24125516711354, 162.13745357514927, 162.7582083223545, 163.72878706640685, 162.06194283679517, 161.76667577160225, 161.8762223636763, 162.06934370108368, 162.35385701647027, 163.05148152761672, 163.74327099924773, 163.49152816858583, 161.69772217166403, 162.51713157408216, 163.9296349320743, 164.55351021187036, 167.33021994122075, 167.6001453955815, 167.58097124508825, 168.67086919506306, 169.83014904253596, 170.1523200942866, 170.09185646605349, 168.4254206142184, 168.23546983847112, 168.46098233152148, 168.32017179506545, 168.5219071484869, 167.78996223556808, 167.83747378347738, 168.1673497348157, 169.97098194184971, 171.06482871939951, 172.2492287637325, 172.47341098077342, 172.5261764268829, 172.4977726535458, 172.72248723677666, 172.65385146139167, 173.156043822755, 173.3263601259869, 173.99256844693326, 173.41985413629627, 173.7700330703496, 174.34643784806403, 175.67770454276274, 175.56195345552985, 183.02773611482746, 184.40188200640281, 181.7668303533105, 182.98945478033596, 180.77580957427128, 180.38134384505835, 180.5348287970412, 181.55011350967234, 181.76691301702925, 180.8540323547081, 180.67103185762832, 180.69249484971442, 179.68477269864397, 179.14401072102504, 179.59754233760705, 180.04094806350292, 178.67874148541594, 180.27437620595782, 180.2040133300089, 181.47878799958517, 183.25680603028238, 181.92466732624374, 181.87083644258945, 183.2363176423439, 184.68297556579088, 185.9286410553188, 189.17730124527677, 187.97831871684707, 186.88772735722424, 186.12691771192397, 186.24324286055182, 187.33725544585863, 186.46265125027432, 187.25639529065705, 185.79173401618607, 187.2914815391622, 186.50549591308578, 186.8123743838666, 187.38329193529313, 187.19435455959078, 186.44156698622373, 185.43688901075322, 185.4498875646727, 185.85845658744134, 186.27477335737743, 186.1683944637634, 185.73387389036415, 186.5539192281931, 186.85259758670787, 188.79530469484214, 190.2292845660118, 189.89539911913008, 190.71761178628134, 190.61481237709273, 191.78689865584664, 193.3672353215081, 193.28181765828296, 195.51940939571784, 194.25802136674213, 195.86738736787655, 195.8912176006909, 195.6867537232301, 196.4642902135086, 198.9886187810606, 203.24691649377533, 201.59310879421392, 198.3111045190251, 197.59661747997586, 196.12591712148853, 193.4102260321863, 183.63218765270776, 185.88533151505308, 185.50668452539693, 177.64565075399426, 179.49634966955333, 182.61067681991, 183.9049848348803, 185.16958469353273, 187.5180432371874, 188.33483915357837, 187.20796475999717, 185.4128942982673, 187.458056105444, 188.92958121421015, 193.49436951079716, 190.8444130874817, 187.33020739771828, 184.40461146717723, 184.35771339028477, 186.3935042895285, 187.045464498456, 187.94122293785307, 188.53972962116666, 192.32894909409617, 191.30602225229813, 189.76324695479002, 187.75617194728486, 188.3993280226123, 189.19246387468675, 185.27748498601255, 185.91150054442846, 186.79460792334262, 179.32198257159638, 174.11617959080905, 178.2266354298919, 174.80480125313346, 174.9301116495283, 177.336173546746, 172.27482882693482, 174.96580894337038, 176.27638327931803, 177.4003096962118, 172.70468805236783, 173.16750664829436, 176.503643628077, 174.9418873208064, 176.47316935438315, 175.85689996751887, 177.47012701615753, 179.59980224986356, 179.35559570322053, 178.62215720831162, 177.47967325195404, 176.55033865228134, 167.90755722132076, 166.81998277606084, 166.63736447995782, 166.18142363243132, 164.9869317824339, 165.35867499251273, 164.5339283008158, 164.9418684589923, 167.65885489904963, 168.36770364604718, 169.15125865314556, 170.43430997131225, 171.75436815531862, 171.9074759317779, 172.35832230561272, 170.30793725063782, 169.51259339392212, 169.66581690691766, 168.73963060290168, 170.74303672635284, 169.00445740028857, 169.15496621009092, 169.52136757517317, 169.16274730619907, 166.80418656046612, 169.14345324973635, 167.83092087388223, 169.68340371405367, 170.77596344179904, 170.94333925299318, 172.9691742081711, 173.640974785228, 174.6175517112555, 173.9896492928528, 174.05693410131815, 173.94813721476632, 173.48214732973247, 174.0885037186347, 173.55783966941522, 170.86961481144178, 170.37328438198716, 168.5561015568686, 169.24313819505676, 167.70724462202074, 168.41092131777575, 166.94124518782695, 167.76528588750185, 168.16365615904365, 167.67842981619071, 167.60374071346914, 168.97000818698007, 169.65373226434224, 171.93112785248033, 172.64447006073237, 170.03786361699827, 171.26516341184325, 172.11889244478786, 172.02729535737998, 172.53204298935268, 172.6607333566105, 172.09636777943393, 172.17445770190736, 170.63094092083205, 171.7090270134261, 174.21870007845666, 175.9435639137292, 175.10619802297217, 173.5703815413493, 177.76959278102913, 174.62312861043404, 174.19199038351576, 175.4130315584418, 175.39317346927797, 176.5189050716253, 175.6836140001745, 174.4253729699665, 172.52824298537496, 171.01712595234332, 171.73428473832791, 171.50813871553217, 173.00057923242883, 174.11669050466378, 174.46505026948716, 175.32817466929714, 174.52218932317948, 173.48277271529605, 175.34093579901366, 177.4652374098148, 178.08081719832512, 178.91509405771387, 178.50192754465118, 178.86226856113677, 177.40265155326657, 178.72370870516085, 178.92573921842046, 178.67512125857135, 179.04185104606196, 178.71906832742624, 176.42397500689876, 177.93065427312652, 177.32576481049813, 177.7483365410026, 179.23013835706882, 180.1582052053723, 181.73913564466895, 182.25437043408078, 180.6270803975091, 179.06893923120685, 179.18504336474936, 178.85879131745975, 179.17313362583326, 180.23967298039545, 181.9393182556543, 182.15837049306091, 180.3464417550603, 179.47945067292017, 180.06861510092278, 177.90875808054815, 171.28072904142854, 167.11521046542202, 168.87751814473842, 168.9724479148794, 172.10095821155247, 172.53860504632894, 170.0921768152211, 169.54324728135165, 169.96227868292794, 164.98679147650034, 158.62404084419882, 159.92136552443483, 158.87645107089264, 158.75135137853533, 161.83080735601112, 162.74096036028473, 164.74370652924674, 164.57010867233365, 165.2772490000227, 166.801079640215, 171.21374574934023, 172.31652757126955, 170.06622220102454, 166.77107198126217, 167.31689258040728, 166.67085063208347, 170.80702821577944, 172.83757936434807, 169.91797848207233, 166.1197740728893, 165.5075672178564, 164.11168004995923, 166.56575547145505, 167.0736603467664, 170.41519268169765, 170.61646611998864, 172.81415224703417, 173.9326166692633, 168.3629017943559, 168.44537326106854, 164.6047569093242, 164.6013582937007, 164.0041727094861, 165.56779830691087, 166.56696334421798, 162.40065576479893, 159.53537058423765, 160.4180862822451, 157.18246378598022, 154.92372625755053, 151.89072711804536, 147.76828409959523, 154.45669295068086, 157.14131563969676, 156.39819386527913, 157.62705094646432, 158.02917511497327, 153.12122914527157, 159.14142453910668, 159.66473932527506, 160.76115561611806, 161.27954887213136, 162.18368579983348, 161.6650409884055, 161.29400418667026, 160.4137547524607, 160.9046606045175, 162.6465201404315, 165.4919241577525, 162.70213849200275, 162.83211274009824, 163.07556606478005, 165.4918999069366, 163.6589687921245, 165.36200611839016, 167.4763199421597, 168.49512222698374, 167.95773975168257, 168.99691217933892, 169.96901853832404, 170.59166968435804, 168.63962562371776, 168.63735838955327, 169.2433676782394, 172.90007612297708, 174.6513662164703, 172.1380854507993, 174.79882791459215, 174.70518663685883, 174.9756396513756, 174.29351306121134, 175.4785938848604, 176.19960971495325, 175.43039683912758, 175.33866592825564, 174.26947259246217, 174.72288947094324, 174.02967097068023, 172.45762029862397, 171.54168634605264, 169.43514704180635, 169.6907711823576, 173.72197190044685, 173.1429525516471, 174.00347817057323, 174.280500614719, 174.94262988831852, 175.39502897950695, 175.57804637271767, 175.13337884152233, 176.46845878517922, 172.47900908317737, 171.8102811905629, 174.3208938917808, 174.0232676723862, 175.01472095625954, 175.14579575614982, 178.13734289060937, 178.18595380873558, 178.81787736790525, 180.04244631521027, 180.55242646012044, 180.31717370847787, 178.362586654632, 178.7436923092826, 179.46137634317256, 181.76100417922856, 180.88444803553068, 181.6768084883815, 181.9176224371462, 182.7630621504595, 182.75138144413384, 183.86024633188148, 183.39240039759153, 169.04210446226335, 169.8954751188091, 169.18663114394235, 168.84987733658693, 166.7248191545328, 165.72415436363005, 166.7064551801315, 165.21159302895956, 162.00349569213833, 161.64589130119947, 159.726548254153, 160.2457973798537, 157.44404392754265, 158.63657126207787, 158.53218152520316, 158.05329654983368, 156.18964939590745, 154.2334128107725, 155.44439958073983, 156.30167175058554, 153.31843660001334, 153.49115340176013, 151.59535884735806, 150.1633781836357, 149.83456606068725, 148.39370131918426, 148.57159482997992, 152.41825007030374, 152.63386372057823, 153.43220268008642, 155.01758365607213, 156.04190459362198, 156.45548575858805, 156.3001094916612, 156.58401591698689, 155.24597985646326, 155.57882491032206, 158.91799021311385, 158.64135500705163, 160.93639697358313, 160.53901759941925, 160.29578473608686, 158.89111168532133, 158.91258215619698, 159.09879874333672, 160.42796120692142, 161.5593284462098, 161.39374716243495, 162.49225111982693, 160.90359351002206, 159.06359466315573, 157.37263659542322, 157.5571674432416, 159.17193063315997, 161.68478012768378, 161.4020998944771, 163.0929434226252, 161.63590062941907, 160.65957255190574, 160.10941914450262, 161.12573035256491, 163.06573205616672, 164.4374860792323, 163.6087364127782, 162.15859357952255, 163.3209098619467, 163.65588705361708, 161.50341103065767, 159.850777580425, 157.92057475594174, 153.00120917865598, 153.28700954593322, 153.29130516613824, 154.81209343413005, 153.92295022498027, 152.3455756750785, 154.64429263325854, 149.5499599286288, 148.46420794035828, 151.88316631368255, 153.54532304366612, 151.96588307516, 152.589467695609, 152.4469565488656, 148.09513781201787, 148.90241599345583, 148.38170205945028, 149.88250314419776, 152.15336994533865, 152.78119763918767, 150.64427990717954, 152.15956755563698, 155.20815017866227, 155.1509973667617, 156.44644041512555, 157.9786853944837, 158.2443371246377, 159.58048266198793, 160.0458621723866, 159.09913369508558, 158.2996244189468, 157.82847739185806, 157.44455504674372, 156.76788025901448, 156.76326058956957, 155.07059292540706, 155.19193153364324, 154.96069403637398, 155.07244667025375, 155.42718187817593, 151.5187480071635, 148.90857881352693, 149.25305383488745, 150.39262474843238, 148.99291906193253, 146.47773265344634, 147.13575845932922, 148.35018500668465, 152.09730141002584, 153.1268701173372, 154.82355557460218, 154.38557815912725, 155.3106980400689, 154.64935907623496, 156.4804132174752, 157.03248328540442, 157.86855972622143, 154.41305114909105, 156.68145369523248, 158.48346869352818, 158.3593327091241, 158.33392869788568, 156.38159271688966, 159.61165858126503, 162.4096590442914, 162.60702077513582, 161.97572151975183, 162.6104951100518, 162.15022530614908, 160.6022346792044, 160.97464630352763, 160.60751914860683, 160.85505913025457, 161.8356638891039, 161.23250884731758, 161.14797470042313, 159.48230759369963, 158.16172124558656, 159.56244663650443, 161.44216644379483, 161.14553829248538, 162.12347473884267, 161.35028935637456, 160.0662639014084, 157.89100728439834, 159.30171778868478, 158.02573097164097, 162.18276674197162, 161.1922313035306, 159.9759150955688, 160.78240194291521, 161.45166406850242, 161.35282721630594, 162.90431110341973, 162.77620703874177, 162.40032926405243, 164.25540271398097, 166.1112707980595, 167.7110306841886, 166.79172035387447, 167.04126921164467, 167.2545797236844, 166.08268271543452, 166.64612609668615, 168.9781665783258, 167.64249090935326, 168.03626871096958, 167.47235883200688, 169.04577445089166, 169.65299176389325, 168.91905786604366, 169.79462787764314, 170.08832728160715, 169.3967310287327, 170.59005088163292, 170.89350355193017, 169.5054446918338, 168.65720651866093, 168.70757633633494, 168.01891654912805, 165.38417328210585, 161.40030940874175, 159.58803521345283, 159.98463083349685, 156.7869146585173, 156.28772666510912, 157.97702991496294, 161.35715654180174, 161.69047445815238, 159.87750994929007, 160.39563640416415, 161.82185178416128, 163.12822494159994, 160.97174521130748, 161.473338054858, 160.21109701052777, 160.59753240381266, 160.13114899169892, 158.5900185353428, 154.12050845990126, 149.030556129707, 149.89598638066323, 147.1322838900238, 145.86415613305655, 150.7392822352768, 145.97603062332698, 152.9026331055298, 149.17590019425404, 148.2499970453435, 137.99301361559057, 144.897710870505, 138.37838397201807, 124.90156402326816, 134.1183363668413, 121.22403928322082, 125.7725121871365, 122.6776973464052, 124.2887782058233, 117.35515893144805, 112.2465771348929, 123.98372303603566, 124.68240787139821, 130.73578470075554, 127.6987386494954, 131.43037958982245, 129.67598326737783, 125.43136600610336, 128.67646091125434, 126.16229657470392, 133.35318427646868, 134.6787489493652, 138.94479366607393, 139.90291763449557, 138.50684444403808, 141.92550111342427, 138.26415184828102, 138.57356831126523, 141.41960107720126, 139.1743895829069, 136.18672612728764, 138.2870761773863, 138.5505455994021, 140.49457787338102, 144.8645064354538, 146.07558186404358, 147.45889467639964, 144.55781863522182, 141.05049717858896, 141.3135057471416, 141.9716027941518, 140.83214411198023, 141.72398628375933, 144.21346805139203, 143.01813686075303, 139.87662398442902, 136.4415233170653, 137.3237545538393, 138.8011461034085, 145.71858049982103, 144.16573771678557, 145.95495220152182, 143.96611177115662, 144.33388207040238, 147.63132662281964, 150.86143013986688, 150.10697787344532, 150.71480200984428, 151.00205483876377, 152.26511304367278, 155.3110018009622, 155.52956958203734, 159.82710126160453, 160.84212362124143, 159.91627760930038, 157.8179199441319, 147.79110362418152, 149.96453400558806, 151.86848734854826, 154.2754025062159, 153.76995530570804, 153.84247581401453, 152.98631733570105, 152.87012231419814, 153.38750365660687, 148.68085010631899, 150.7722752133521, 147.57465312715757, 149.94996747251275, 151.33013351231952, 151.76444206005698, 152.4234118606532, 154.1724297564094, 151.99604720640983, 152.75590858397706, 150.7924178427464, 152.7382499912933, 152.38653643152233, 154.68785682095668, 156.43555312328704, 156.51664222950185, 156.1645251526688, 155.29563751526757, 156.16496832933214, 156.98535886288323, 156.3464867451666, 156.0544436970089, 157.7235431860234, 153.87330717857853, 155.32285420944513, 153.4976191848707, 153.7624707009016, 154.40736558818767, 155.13702310603122, 157.33529257010375, 158.06481247881698, 159.62958157327512, 161.15071345351544, 161.26661596826386, 162.79171618889018, 163.31451688867952, 163.98344551610165, 163.87798094799106, 163.87321408682965, 163.3037341595304, 163.05426716829174, 162.82436563550627, 164.79227709638562, 164.6023881190046, 166.1089201127346, 166.11609961188404, 167.2993896647901, 166.2155583181204, 167.96529215630528, 170.63495434778042, 165.90945416817476, 164.67603456978762, 161.26874318815948, 163.89605927359332, 160.99103205783413, 162.17026023506767, 164.59340536303773, 164.36674744660235, 165.32307611247677, 165.43435343115488, 163.43315366933913, 159.55268322529582, 160.5665578177304, 157.25107879271738, 157.9572316239746, 159.58892488244055, 161.65271063214092, 160.26504755656345, 161.1735405209158, 161.5883644553829, 161.4117385075311, 164.13547684839708, 162.68010668321452, 165.98158105792348, 167.14961494448866, 168.25401949270707, 169.46982558988378, 168.28720365511188, 168.39794046916015, 168.5802370492279, 168.93275645506444, 166.76853359949325, 167.92387629602516, 166.6193233026803, 167.63321626943306, 167.56168921215252, 164.46773789209226, 162.2646758194681, 157.84344365495986, 159.33649206857805, 158.25047966823703, 160.60597287744332, 163.05321591178807, 162.6898316194538, 166.22649285352637, 166.07332561105622, 166.97448803547886, 169.36345047691444, 170.27406951962624, 168.2768435251925, 170.79934175653804, 173.73858252803444, 173.55025866508365, 171.9644905411958, 172.7133115563222, 172.6971428514331, 174.19534797917055, 177.14870274368846, 177.08271404826058, 177.25075713194903, 175.2529127211004, 175.88042180627232, 176.39312355086048, 176.7012882596712, 178.45654413654964, 177.6847668021857, 178.8990343004707, 179.16831110904835, 178.67276754945706, 178.64152235077978, 177.84989717887558, 180.18777159632987, 180.63345341727205, 181.97085132243524, 181.60598788108456, 181.0188744032145, 180.53399695119435, 180.2715185689031, 180.59260226139332, 181.24821449116246, 180.68192947499318, 181.1407411097662, 182.29500383140282, 179.30284618833542, 180.1755202182125, 182.15533814155904, 182.08464352453635, 181.62967638699925, 180.59373817022131, 181.52315618639147, 181.52257375615082, 181.0824493480669, 179.68266152154698, 181.65752520280554, 183.99809468567835, 183.62232527049943, 182.36809165725177, 183.0708831621626, 184.72398683572374, 185.5164188042193, 185.71449949443206, 180.74882367571627, 182.29446120003325, 184.56283641135923, 184.5048159505548, 186.2539639944319, 187.43371739584296, 189.03618860562696, 189.24197669728122, 188.97646018056466, 187.6956895574425, 188.6601688362411, 188.217842458548, 187.96288205778703, 188.3036984121455, 187.60923323149467, 186.7087899754137, 186.75283256237987, 188.70057567345398, 186.49929814934077, 184.45554018030725, 188.19652570237582, 187.65352276387293, 186.41783563843987, 184.68846595186687, 188.37311313580142, 188.58133091197084, 188.9808342483662, 191.2155654861692, 192.51511125251614, 192.9888595023009, 195.39739253717428, 193.7363756437306, 194.68314963369212, 193.50081307367606, 192.78352213075974, 193.58666734531917, 191.7364752516748, 191.71782217845546, 193.10175565691017, 195.30097911644566, 195.20543154037608, 194.57176905450387, 194.2811545260999, 196.18004764215323, 198.0604796098532, 197.9144411070502, 198.03005574903412, 198.96174796349806, 200.6192401449562, 200.7736695309567, 200.5432300312958, 200.42134972054419, 201.92282996676644, 202.8493889617451, 202.11790901660626, 200.784876509065, 202.44402587357786, 201.70836463165233, 203.68418904048266, 203.103784804146, 201.70131884186173, 201.9452029702164, 203.29962159632106, 201.78023245609114, 202.26514035330527, 201.59132952393483, 202.33197918824925, 203.12085079793323, 204.52586404417107, 204.52855520365827, 202.13961876979096, 197.70754319261715, 200.48705640545944, 202.9108582707044, 203.0854500635867, 201.18458984115142, 200.49569090682033, 201.3472903741366, 201.58445085749904, 202.88490805042989, 202.06514390577954, 202.6451374972824, 203.68304130209694, 203.91159847289705, 203.78339403288797, 204.33201354406728, 203.95841433180198, 205.59693927642377, 204.50358758167093, 204.71613334959198, 203.81260749218166, 204.21031525779043, 204.73735105116197, 204.35623493624936, 203.85504940326737, 201.96130996662617, 200.7119075900623, 197.9254611577847, 200.93398168925526, 201.66180042732856, 201.23168992602635, 202.62822996772437, 203.8243725416443, 204.39861943079816, 204.20319111158497, 205.40661518948613, 206.20061115170287, 206.8482821615203, 205.01049602600884, 206.117967307079, 204.49719372863484, 207.29972597513236, 207.4281897002547, 206.6261330904134, 207.5331240817476, 206.85099308032798, 204.24021043431003, 201.707811118564, 205.00752793385573, 206.17253005562128, 205.5098663063932, 207.04560594568233, 207.70483663890047, 206.61949871073284, 206.09655229779915, 206.43152711678934, 205.5133853256961, 204.85492383574228, 206.66706437120632, 204.23995678652815, 205.4051474471887, 205.90252349099913, 205.39259318357858, 206.38094638841253, 207.51748362360487, 207.48713443158016, 206.95697848204782, 207.7089470910917, 205.59447935214453, 202.98290517287188, 202.52620562761496, 203.27066227570236, 205.00518711470997, 205.48518195679247, 205.61646169184442, 205.23388315743819, 206.67978039099887, 207.38517865202738, 206.86957366861276, 206.7088878686328, 207.7924065404901, 207.59145738995346, 203.63581084243035, 204.14263515998567, 202.98340339119147, 201.82605999185373, 202.33560021386046, 200.53452715696912, 202.12707947437787, 201.4591284862543, 199.94384134156843, 197.00128550905848, 196.08013763530826, 197.95726953631245, 200.47785843363587, 200.4762565113417, 200.8143768559699, 197.80616979311955, 198.18678160924105, 194.6579006028514, 196.6325205282183, 194.90335524786772, 197.60858358482056, 198.71931254664503, 200.1608010961792, 199.96696513919008, 198.9753080678975, 198.51262309847803, 199.43374377061414, 202.48909310233327, 203.73305368734898, 204.15294984033972, 205.13015034865214]
equally_weighed_senate_calculation = index_calculator(100.0, True)
Index list: [100.0, 102.60897231944001, 99.04549793191217, 98.69551384027997, 98.50461342666242, 98.25007954183899, 96.27744193445751, 96.1501749920458, 94.78205536111994, 92.58670060451797, 92.74578428253261, 92.12535793827553, 93.28666878778238, 92.77760101813554, 91.34584791600382, 92.84123448934139, 92.90486796054725, 92.26853324848871, 90.35952911231308, 89.3413935730194, 89.78682787146039, 89.3413935730194, 90.10499522748965, 95.16385618835508, 96.21380846325168, 96.15017499204583, 95.00477251034044, 94.62297168310532, 90.83678014635699, 95.06840598154629, 94.3684377982819, 94.08208717785556, 93.22303531657653, 95.80019090041363, 94.65478841870824, 95.641107222399, 97.10467706013364, 96.37289214126629, 94.0184537066497, 93.41393573019407, 91.60038180082722, 91.72764874323894, 89.97772828507796, 88.73687559656379, 88.25962456251987, 91.56856506522429, 91.60038180082722, 91.695832007636, 93.4775692013999, 94.12981228125992, 94.52752147629651, 95.03658924594335, 95.45020680878139, 96.054724785237, 93.22303531657647, 93.20712694877501, 93.8275532930321, 94.30480432707601, 96.40470887686922, 97.39102768055996, 98.79096404708876, 99.10913140311801, 98.72733057588289, 99.96818326439706, 101.24085268851414, 104.32707604199807, 103.1816735602927, 103.37257397391026, 101.78173719376389, 102.38625517021951, 103.14985682468975, 102.19535475660193, 100.60451797645558, 102.86159720012724, 105.15431116767417, 105.47247852370346, 106.99968183264396, 106.87241489023228, 105.31339484568883, 106.5860642698059, 107.66783328030544, 107.73146675151129, 109.06776964683424, 108.46325167037863, 107.09513203945272, 107.57238307349665, 107.54056633789374, 108.01781737193767, 108.4314349347757, 109.54502068087815, 110.02227171492204, 109.51320394527522, 110.49952274896593, 110.11772192173082, 102.4498886414254, 103.69074132993954, 102.22717149220489, 102.79987273305757, 103.49984091632197, 102.44988864142537, 103.14985682468975, 103.34075723830729, 104.23162583518925, 104.99522748965953, 103.37257397391025, 102.32262169901362, 102.44988864142536, 100.66815144766143, 98.12281259942726, 99.84091632198532, 97.48647788736871, 98.2818962774419, 101.20903595291118, 100.92268533248485, 101.20903595291118, 101.55902004454339, 102.44988864142537, 104.07254215717462, 103.40439070951317, 104.26344257079221, 104.9634107540566, 105.75882914412975, 105.66337893732096, 107.12694877505561, 107.57238307349658, 105.85427935093851, 105.59974546611508, 106.39516385618826, 103.34075723830726, 104.29525930639507, 102.73623926185164, 101.81355392936673, 101.11358574610236, 101.30448615971991, 99.80909958638235, 98.4727966910594, 98.63188036907404, 99.99999999999991, 98.31371301304476, 97.6137448297804, 100.03181673560285, 101.272669424117, 101.36811963092578, 101.01813553929357, 96.02290804963401, 96.30925867006034, 96.40470887686914, 96.022908049634, 97.2001272669423, 98.6000636334711, 100.73178491886722, 102.3544384346165, 108.08145084314337, 106.33153038498239, 107.76328348711408, 109.64469354164807, 107.31887833870073, 107.54004789746757, 109.66015771861557, 108.92958929623862, 109.62497574265957, 110.1449273988261, 108.66131589988728, 106.62904503757716, 104.92297744810286, 106.97142108204756, 108.11659703282031, 107.24943413188328, 108.70704564765386, 108.5144168710907, 109.6699545168661, 107.51755547741561, 106.88010234676041, 107.42389046848548, 108.04073637995553, 106.48643444762067, 105.9144349108384, 104.80443315513266, 105.03527638632798, 102.65087716200927, 99.74042890869005, 98.67795942342147, 100.2686477410986, 100.29570388728898, 98.57728505277484, 98.1218367644154, 100.93487217702557, 99.88998310659143, 99.85725881023035, 100.52181529676724, 99.44639202068731, 96.54274153428007, 94.68193014102884, 92.57025760722325, 94.31559123698375, 93.82367650865567, 94.43690086352404, 95.03712210940618, 94.74587884921189, 94.69600377210858, 94.38114343436108, 95.3053650549526, 96.51605316468294, 99.61155028642654, 97.72190457342536, 99.39467672566353, 100.01370492711163, 100.89143145192911, 99.40141447817146, 101.09388081612546, 102.11806156042753, 103.71720440219009, 104.58707030931969, 104.23648117791514, 103.63785151274493, 104.02715008977931, 103.66983541924093, 103.09008803157833, 103.75572566233055, 103.72613190144567, 105.77836119066384, 106.45274006716998, 106.79747908272519, 105.84531738920968, 105.56597042933113, 105.01517678048123, 106.3139424426921, 105.27593239572845, 105.97457800140394, 105.55714512822674, 102.95048302963144, 102.05505753269901, 99.80918489778814, 101.57594098535915, 102.35676925852871, 104.10037999429073, 106.30898941105977, 106.5261074496906, 102.67004517586741, 103.77692826933676, 104.32046049454463, 103.77781406273769, 102.24770572705332, 102.18824407179365, 103.83352422898997, 103.100100738475, 104.09284406091048, 105.82600032740667, 105.59157416202738, 104.84073338378916, 106.44803692842306, 106.39583414089019, 107.28471192206683, 108.81781155500252, 107.28547704905509, 104.83253641517197, 104.49634885546313, 104.59214748569744, 106.91322794624917, 108.31976455450184, 106.76200393694982, 104.32305996134487, 104.139964777497, 104.89299728832707, 107.16296848287419, 109.38745795621438, 109.39884693347807, 107.8682582042868, 107.91635129283026, 111.47974872276164, 114.48265137022644, 115.7764640602272, 115.41790868838805, 118.56231680058997, 118.89877493762678, 119.97477770883492, 117.82422143290795, 119.25759152974521, 117.25616943642373, 116.03781623973012, 114.15742132855256, 114.5401461479545, 116.08982248581806, 116.41512242282073, 116.11180024159371, 115.12162515829044, 114.57046811871537, 113.54813467528372, 115.11625485283567, 113.51252407431578, 116.14735902401002, 114.5096010663965, 115.75130605147882, 115.83315635339623, 118.87806504254199, 118.42906334939073, 119.43965896472372, 119.49894824868166, 118.19347950267911, 119.33845515176206, 119.38362489254621, 119.04854806354605, 118.69472512107656, 117.88514400547707, 118.54074638332419, 118.93373447356343, 115.7567176233232, 117.38139185517917, 117.0322172207994, 119.78633161587834, 121.72042277739729, 123.66513134264618, 121.79851823450777, 121.87251773988666, 124.04656266259533, 125.01925909256005, 127.08252366888767, 130.36153771895567, 130.3169103725026, 129.7093896772943, 131.1295548726697, 133.3460103763973, 134.0618279476423, 132.9128792362615, 130.82972187907407, 132.44533892024836, 130.48358307538916, 131.9388595895701, 131.8547298761001, 131.05540300717766, 131.4051199693831, 131.20856315509874, 132.06246764383172, 129.80783757431345, 133.95752532785923, 132.96025578289732, 132.8962187196909, 130.90361013207183, 136.49201868961734, 137.2047112929134, 135.18959874544856, 131.8495361621568, 130.4190055849948, 131.5842609721364, 132.18920921365245, 134.37688096090156, 133.83984648713405, 130.4773551366096, 129.85452064999424, 129.67576780370388, 133.04037084057705, 133.69085870785514, 133.96016605810527, 134.9629570468555, 134.34049698709836, 134.0765219392225, 133.91009056752333, 134.92452884046492, 132.8756664380461, 134.22538868271823, 133.91316239041643, 134.37022460255838, 134.27812856468958, 135.08373436371934, 136.904404650472, 135.70636611735983, 134.44546002919301, 137.0426008794439, 137.57563149874875, 137.96449164430217, 137.2490324914836, 136.63780628974936, 135.6866811932447, 135.91893408164688, 133.40850731165352, 132.54470396730056, 134.41131685182947, 135.04639689262837, 135.1925029916387, 136.488956594925, 136.85462463036728, 135.7718853657951, 136.62530032219993, 135.94019929461487, 135.85517436560573, 136.7825109745754, 138.27052939259653, 140.28422672161474, 140.12263719470982, 139.966236333372, 137.03629512492, 135.55713017471834, 135.7787448798453, 137.0064905737717, 134.56268330651483, 133.2145112939628, 134.07671782479255, 134.62829201023283, 135.1280953581338, 136.01916551251128, 135.9783746433087, 136.76682090123433, 136.6887851541936, 139.00420687389524, 137.2516022216827, 136.4987077873544, 137.53246189685765, 137.03623430757972, 136.3440903610037, 136.48658797773513, 136.960288971732, 135.6643860257849, 136.69602946282214, 136.4855535275338, 136.2449141301649, 138.3234770607464, 138.12712344223434, 137.32850150439396, 136.08065691251204, 136.45243862856094, 137.65614655414308, 136.5088700522913, 137.70972891239197, 138.6705641028795, 139.57735515238838, 141.21610147944844, 140.96227136165004, 141.98163865043838, 142.13327689180008, 142.32229623059874, 142.3529173060855, 142.97264742733162, 143.70064072168913, 144.56387626489698, 145.35019281225146, 146.55708754743787, 146.34861370447277, 144.9149838216301, 145.2400854134478, 145.134228250773, 147.37783308591398, 147.5342221942024, 148.2641078260958, 148.32752898383757, 149.67277125553113, 148.95204927527539, 149.83571243229093, 150.0572670432887, 150.86375799776863, 151.3055886849266, 152.46204106295534, 152.7130548400186, 153.1197161370403, 152.56318110816906, 151.5834432409095, 152.7253764984768, 151.30270824892784, 151.78448451748412, 152.50512867220868, 152.11354882573775, 152.17252333468545, 151.03252193387414, 152.21275610457957, 151.8643907208871, 152.90603915276907, 153.17762688059466, 153.6302438829616, 153.08315867258227, 153.58746466128602, 153.36471826710658, 156.84554765251315, 153.739766571436, 152.27131829289837, 153.8433980616103, 152.96797695496934, 153.1147712894916, 152.14609888735515, 153.29897694851508, 154.186488207362, 154.10829849936047, 155.48585096735454, 156.80125343514533, 156.3495293273266, 158.229382205039, 159.5907724536947, 160.26184105247177, 160.159686508527, 159.74528576966355, 160.2454434180184, 162.01527730539374, 162.33986865608009, 162.71498509974626, 163.3050763241199, 163.1448946066699, 162.63451031752209, 162.74023625084618, 163.99163344727856, 164.09273553160173, 163.33865286023598, 164.20699952939634, 163.7351483579153, 161.90415750833648, 160.5551750009402, 162.2840863391045, 162.26065410668244, 163.6899162251555, 164.20767490110225, 162.58956065544334, 161.6734221724548, 162.94157265971972, 159.70921793498968, 160.84208510538542, 160.68743267768727, 160.16690777496905, 157.75172030971353, 159.05303940451412, 160.84304372271626, 159.62587665392192, 157.46390400088052, 159.82321333120206, 156.0605759245147, 151.1060344870382, 146.2157569514248, 146.37475377169991, 148.63968662612692, 150.74565109224807, 152.18861582568044, 154.47916527559755, 158.72230456277376, 157.07096351019385, 159.14006663325875, 160.46006762362265, 159.33083428238882, 160.73515658904512, 159.6058228576985, 159.09849844104465, 161.0059088812824, 160.3417542168704, 160.95419673091365, 159.88950579279032, 161.15515748538613, 160.6842325695851, 161.69067382232342, 162.7096095103754, 163.4522823297309, 162.10600778455924, 163.16461200291502, 163.4580183768152, 163.93441845553943, 163.54832786737762, 164.4012707518212, 165.2520103983814, 165.73722710354446, 165.49059182919208, 165.99255709433206, 164.161124298242, 162.55706975400437, 163.68243904033918, 166.06834326506657, 165.225903716276, 164.78140001306198, 162.1010924635615, 163.6847754923668, 159.949042365787, 160.14545157270248, 157.86599917113935, 156.41342763345182, 156.30418630695166, 160.01067410334292, 163.90635082720922, 163.70625587221042, 165.05052462858518, 165.51982629956063, 165.69533176475798, 166.02948543907183, 166.81621634838152, 166.06733126544805, 165.1873200922641, 165.47613406401962, 161.1251596648294, 159.56611915167542, 162.95682770511132, 166.5545686938598, 165.05133930651436, 163.38387250747346, 160.6869062547657, 161.16034573879696, 158.94369610435353, 162.25283217117533, 161.8561318523886, 165.6048768087492, 166.8914117798187, 166.96783794565408, 168.41215650911354, 167.42759885479583, 164.63053161980542, 166.08940797740038, 163.71404821574953, 166.02699700719606, 170.58178464444055, 169.98414353785998, 171.25623593840575, 172.48235121661955, 172.18614830339456, 172.58364562176013, 173.2145987419127, 175.3255419664908, 176.498237171348, 177.1954551135625, 174.92406992417608, 175.88773968544047, 177.07227107236113, 176.71131756854686, 177.4534552366444, 177.55429595667476, 176.22455231742444, 176.96441547043426, 178.50410595249517, 177.6441484366586, 177.6661498464731, 178.17880441379486, 175.33538850209968, 174.84988439003627, 171.91718407300726, 171.82396577536682, 173.34110839597926, 173.81157480706662, 175.4180773871673, 173.6597855734226, 176.91087430297998, 176.13313593552812, 177.00152549741048, 176.8418167264828, 175.42638350428925, 172.87349446305046, 171.42213692155423, 173.21453778222008, 175.31599743438497, 172.99179891155413, 172.04832843715965, 172.94881047750886, 173.68016171442898, 173.92764653532313, 174.55352514706092, 175.45324695501893, 175.9243601167086, 174.6120995272977, 174.99188427951947, 175.8978701566887, 176.5044817129528, 174.36834874644893, 175.22863906156468, 175.25170974429764, 175.98056684404483, 175.45055442248412, 174.60870013737087, 173.50384318192403, 174.2140217594584, 172.49664042005188, 171.39628438859202, 173.85385774917037, 174.08444378207776, 171.3868505212655, 170.71574304219396, 171.39349232562043, 173.55210863181574, 172.88494626980372, 172.40227568624414, 172.5328608851433, 174.61651960701093, 175.3156819402682, 176.21231410419605, 176.20924052950454, 176.53644753909524, 175.64687271303777, 175.40138669221506, 173.85887577213435, 175.23326484010326, 175.02024172425186, 174.40845183691857, 174.52742282547973, 174.28253085694, 174.6477854327908, 172.5312202713613, 173.23222159128753, 172.29360395024892, 172.45414066132741, 174.04835637793434, 173.37726508965724, 171.95372398320052, 171.46663572811713, 172.82787243614624, 172.75677314315215, 174.77929953010474, 172.74664527953038, 172.8337831748549, 173.63016671590432, 172.14289968719922, 171.58802510675434, 171.12571178594158, 167.73320541778784, 167.69567330480245, 167.69339865991793, 167.3311155219189, 165.35156418519614, 167.3536738418899, 164.16798103570437, 165.35525124883503, 166.97426939780706, 167.8309772000528, 169.15253748235364, 168.6645735343813, 169.1119016797097, 166.9811541757208, 165.58445184303633, 165.0362757280592, 165.74938675531428, 164.65686541853574, 162.21214966178184, 161.49763335669084, 163.11477979535178, 165.3130873116462, 165.42753001969916, 165.70704106757424, 164.36400001449812, 163.59702305665397, 161.6086707471242, 160.6290770353347, 159.09261442001159, 162.08491372570757, 161.73730816544992, 162.91593738910453, 162.15759452796746, 163.40249126297726, 164.95437147813973, 163.94369370033604, 162.36039081784995, 158.6793148066613, 155.1821331613383, 148.65061765191263, 146.58171451652518, 150.6810990410876, 155.30994108654968, 156.54534515748242, 155.59938410047337, 151.1214675156931, 153.36015582316097, 153.70060739023845, 151.74333662712868, 154.98663435212393, 152.47123078945992, 153.41621999717393, 153.26243834005166, 152.24804645374257, 154.63642991424373, 157.35038759788824, 157.5586490126553, 154.64384125884396, 154.97956451026798, 152.40637368285493, 151.25789673091458, 150.69791660461576, 148.80750568647682, 144.12074694335223, 144.3451055577457, 148.33256602672867, 149.03706280730884, 151.98403954301958, 155.0781233700311, 154.27205657209052, 155.90592937766903, 156.73815833104848, 156.7807658340003, 156.76828730084608, 154.64559094466682, 154.51571420847313, 156.42354078020452, 157.24198762634967, 156.25130862452457, 155.76161257680127, 153.7843812047135, 155.83187140175656, 157.21728659553204, 156.00495831959572, 156.62773968485251, 158.6672487657531, 158.18687910335157, 157.4184992250465, 159.33715989401864, 159.7420127302665, 157.48577243392475, 159.46553762399182, 159.54338099509937, 157.81046997787277, 157.40581432735493, 155.07105766174834, 151.83159478386114, 151.22087999898156, 154.4757429112811, 153.09074485070886, 154.75456055600404, 153.1110299597868, 152.58517858602164, 152.42278344293646, 153.53539382516507, 154.6420069073316, 153.63445661201305, 153.70428216141704, 154.5974458859355, 152.77541619440083, 149.43165532006648, 150.6926159698532, 148.20753380385204, 147.78205367588853, 147.93881300924772, 147.62352096096438, 142.80457955024102, 140.68666873799523, 142.48115680276362, 144.24737214178325, 141.74347731112024, 140.0611308900175, 141.4016749395109, 143.73599826265712, 147.8756350625135, 147.73619037079524, 147.08477672617295, 148.14531134092738, 146.01785958453277, 146.5491910785073, 145.79584322381226, 145.7283390971196, 141.20719601527057, 137.47228019894033, 136.0285538697882, 134.52729400160598, 135.76761493583334, 132.2407772119299, 135.38955906882853, 133.20966899433793, 132.87870614965152, 132.9169989980508, 136.10584986916496, 139.43097718931594, 136.4215062055002, 138.95301264530383, 136.84993652665653, 136.9776257918954, 141.12249197511244, 140.60799190036033, 138.1614937036041, 140.40635402029014, 138.54706023458056, 136.73233959790966, 133.81998391918503, 131.50840392002976, 133.12178510192206, 130.2405928266577, 133.82652882329128, 135.55451316660893, 138.81279603194608, 138.24869124936234, 136.27769751135284, 138.31763311457323, 135.50027082768224, 136.60101127787098, 138.59358898659377, 138.6543146614669, 137.7086705599236, 140.54837687521808, 141.85092165580036, 142.59287537846097, 142.57579011674287, 143.28397815367967, 141.07340239439065, 141.62726252672792, 141.60398640444848, 144.8546321739921, 144.3644670741345, 143.20975310643618, 145.12116121545947, 147.46940759539254, 148.1931961923938, 148.2439306704531, 148.44831101851784, 147.0322797857986, 146.89501348786405, 146.52793316656104, 148.1739398619777, 149.27965801315366, 149.73251613416178, 150.48699887870978, 149.55057445609933, 147.80636024448822, 149.50227551802885, 147.52406439647527, 148.87747440892565, 148.97783317843354, 151.1171966694193, 152.3147597904517, 152.3953179041677, 152.4075869169262, 153.42320308056725, 154.6976697405844, 154.97364551848847, 153.97991054606922, 155.12686812570198, 153.67482434721853, 154.88977579657237, 155.8653289093187, 153.6906274130338, 152.75703137282355, 153.2181813817636, 151.12237771826713, 150.5214370553873, 150.8877130811943, 150.8109264181143, 150.70623027577994, 152.6367968348846, 151.32460548558413, 151.54779563792704, 150.34509817395326, 152.27048742252578, 150.8246912723293, 150.6030185064151, 150.81149042669932, 151.66609200342248, 150.74369622508178, 152.34104661778017, 153.4608163714303, 153.28567452935252, 153.83402559271136, 154.52781613486323, 155.03111950686187, 155.40189623302862, 155.77463137845305, 156.43859310010228, 157.19373621039267, 157.51320971236825, 157.21404040263087, 155.03671694619018, 153.36973468961475, 153.02079380559766, 153.333503690436, 154.02089389560237, 153.71369023093098, 154.8455198659056, 154.88620795664798, 154.81667863168988, 156.5717771050151, 151.4338919208374, 148.0515726987976, 150.991462163539, 153.56529207818355, 157.3058517292333, 157.43215386315651, 155.77725336362582, 156.6054625245256, 155.91905234720323, 158.25311624931115, 158.94853657137486, 161.6878186530473, 161.61307188423882, 162.24901631924092, 162.90296200851745, 162.81422911706014, 162.7416269645188, 162.6593059858317, 161.78788668533755, 162.63628626834958, 161.88668665379666, 161.80381929983807, 162.01050183867076, 162.37541159022567, 162.50590626960428, 162.1201700586769, 160.3712252004685, 161.3784592067137, 161.10261285399085, 162.2036433424809, 162.22078136663106, 162.25353640197486, 162.17456894211554, 162.9526506168253, 162.60277864127366, 163.06016430739373, 161.80973162563143, 162.58119259320725, 163.27343292847337, 162.84272399084534, 162.7332390145171, 162.72260693128467, 160.81188151708395, 160.27246935329933, 159.90473405747838, 160.89254941559673, 159.29097271724854, 158.90111406994285, 159.24413267574758, 159.87951371217758, 159.99145089951332, 159.16200527662062, 158.79649929255234, 154.73923063385993, 156.6892271572715, 154.42669471947866, 155.2184372711367, 156.51119269847894, 156.2785669345504, 156.44969585734637, 156.2088825701442, 158.20362795818158, 159.98307881912953, 159.60582157676308, 158.48200814070577, 158.8475061087249, 159.83879684883223, 157.90726719560473, 159.27365686269238, 158.37484524421853, 157.25701529481904, 158.3894742974746, 158.3991148932802, 158.09923852159378, 159.61405586682991, 157.17680815435517, 157.2169030295748, 156.69283612488567, 156.4214574617372, 156.20659004295177, 157.83358513733737, 158.4739652476261, 158.3445540087204, 157.57692785316897, 157.61168029825637, 156.70248010403205, 156.46092546843283, 156.35464982063704, 154.90001495283164, 155.07108560523824, 153.6715156057597, 152.19833540776403, 151.3311471403916, 151.5878916102199, 155.54903365691843, 156.18465866481029, 161.0951846708297, 163.3907818377153, 163.03527263310036, 163.53623250970844, 164.13900376743354, 163.61791810981947, 163.65764494428893, 162.41367018477203, 164.50404893820175, 165.01697172713898, 165.29996298086834, 165.25297569882048, 163.62609668113734, 164.28306315933065, 165.19589615140592, 165.50974705293046, 165.67093739709665, 166.29487048422172, 167.15213587622114, 169.02112092016228, 168.74893511342765, 169.4190877244774, 169.01021991847475, 169.7258788831666, 168.92112280866124, 169.47339081287868, 168.9745321495827, 169.26084849271413, 170.31433956745528, 170.38545929229295, 170.22170365301693, 170.73362281397053, 171.20607505312702, 169.24713010642773, 169.0033395231653, 168.56805801158822, 170.54943180083475, 171.24039107122945, 171.28866525398206, 171.62219457721284, 171.3775350722489, 171.21717360319147, 171.43960862071341, 171.0429015185116, 171.24009834290834, 171.35082165492324, 171.6479268919459, 170.72095645269988, 171.17161564264234, 170.91823210694486, 171.96187384893756, 172.66947910763733, 173.18050640623483, 172.76315595251504, 171.2509618262143, 172.70714443004917, 175.6080264420095, 175.52411378926445, 177.20282363099142, 176.31719522540158, 176.12314408693734, 175.921173470947, 176.95106762360308, 177.28760983007476, 177.6435134720776, 177.83127867146013, 178.55911055902632, 178.13626852092693, 178.2614269257059, 179.3136636037951, 178.62933550828737, 178.65884738543875, 179.26024720742748, 180.40535841394203, 179.9109668386463, 181.53281457039412, 180.6209157328921, 180.76858630893577, 180.23174303286936, 179.68292302751644, 179.02938473937093, 177.89600073346568, 178.63554618619824, 178.77743868650657, 177.59906736785499, 179.6720528658129, 179.11846146944623, 178.85086063317965, 178.1618991957999, 176.48624924151474, 177.0482209027664, 177.01981553645493, 177.1103850498293, 177.10543227060458, 178.3159838166332, 178.5287981282829, 178.34170725761018, 178.19634958849036, 177.9597425533858, 177.30260547824062, 176.91642466847216, 177.61800693826552, 177.7324869820065, 178.19365643598562, 178.57810897712434, 178.51996462295952, 178.0020148253197, 178.59785194872234, 178.28196594448684, 177.93151133931923, 179.3652949976471, 178.58633273660567, 179.9823026059346, 180.81003926370983, 179.79805243360215, 179.95089226565875, 178.93858848205045, 179.31780347143922, 179.8046430755254, 179.40863795085122, 178.7041516125083, 180.0526776541152, 179.87133921060422, 179.04829040424517, 179.82516855779306, 177.75095026657763, 176.68194122680435, 177.45045566687253, 176.65299168797748, 174.2300813091743, 175.22838076574868, 176.5645610133954, 177.25192828493454, 177.222618229671, 177.82457660574389, 178.00419795619285, 177.64951841618026, 176.97434176767084, 176.75452437873722, 178.77140547396263, 178.6341280695651, 177.80616494903825, 177.72622519531996, 178.5807320600108, 178.13319893765973, 178.87737750528902, 178.66334317469713, 179.67744288842417, 178.60911949019842, 178.23350388622745, 177.81712983447548, 179.15825255893566, 177.91645036247107, 177.90128546882175, 177.36172117883837, 177.56998057542856, 178.7361180457784, 177.66507841602254, 179.94413765177848, 178.96939783725725, 179.51985516629924, 180.9242738246596, 179.9542452177486, 178.6462131604842, 179.70470113788002, 179.2841898382488, 179.61188325684196, 180.84232501054927, 181.0907720705978, 182.0622925664383, 181.85430765892698, 181.90340895153057, 183.19358203057317, 184.171851966748, 183.6398060220258, 184.23531285808613, 185.26380660251309, 184.90753120561862, 183.5343180331833, 182.95583735959067, 182.5782650881947, 183.31685619307268, 183.92148410706722, 184.24266224829447, 184.80349935844836, 184.77249043189897, 182.931961884614, 182.15027843496188, 179.73814910796418, 179.53537881961924, 181.6157794110376, 181.55887890521035, 181.6598726383968, 179.06156070970425, 178.503094856299, 178.65807872826963, 180.05510439931683, 181.01718985090326, 181.24033585035065, 181.9595851683928, 181.87618688471946, 181.89324656294693, 182.5729347560441, 183.7546205566555, 184.52807999468877, 181.9055574254829, 182.61879835248442, 182.9829225296041, 182.3562124782216, 185.57811858604225, 186.0342735432211, 186.1303259671308, 186.64242770399372, 187.05080403119794, 187.7929278771926, 187.53894541746473, 187.4962180778532, 186.6051985624215, 185.26394507787384, 185.25835693244082, 185.58092384594227, 185.5404972538255, 185.75539650318254, 185.96581902905112, 186.21289421854706, 186.66396303308795, 187.10386420346182, 188.0115938008199, 188.23402620623122, 187.27152035528064, 188.3331886376027, 188.58880666218087, 188.69459666196622, 188.3317073613322, 188.7563974127262, 189.40609736748812, 189.47571988504814, 189.54129619724338, 189.61920367687134, 188.49525741131401, 188.10579372483238, 186.5308954739027, 186.5523305500461, 188.78542242096947, 188.96597556902796, 189.89083769462005, 189.36771669674002, 189.53107140138917, 190.8699136992982, 190.37284911417592, 190.16700303670638, 189.2599429934575, 189.34483433135367, 189.83607949294932, 190.36382886727787, 189.59988822249093, 190.14822386941754, 191.30129397883672, 191.52847981429355, 190.91661658274546, 192.20539691083385, 193.5349995982248, 192.97929269997178, 192.6434069797813, 194.62482244437098, 196.1134428742612, 196.67304795961184, 196.3630877561135, 196.1911507543327, 195.11982015154584, 194.0128319384293, 195.0227237661483, 195.59370402116886, 195.40572012428206, 195.68253859007459, 196.0803139548904, 195.1299969395849, 196.77936095764304, 197.80936233172545, 196.28282734991842, 196.51364409179442, 197.7710642206874, 198.77393634520215, 198.83471778732127, 199.26344845834626, 200.62612668158513, 199.4710271262737, 202.86832666934205, 203.3132964417278, 202.65983177650432, 203.527015874886, 203.26767354499063, 203.53694184117845, 203.59904667099735, 205.11562444773153, 205.62882685968896, 202.71106016503117, 204.8905077720764, 203.84606124722063, 204.9716644873452, 207.45516732639348, 208.38602850201084, 207.2475718862108, 207.43864469225966, 208.46587373173486, 207.27292217239395, 205.2495484416001, 206.39012575408475, 205.44136263620095, 200.9278480271986, 193.96291516523067, 196.05656161010992, 195.70198434452044, 190.06400329832675, 191.57017221588143, 194.65349090604082, 196.2408131280774, 198.67105369313194, 200.85821463427052, 201.27225616587356, 199.1415428535802, 197.128454695582, 197.8710891321686, 203.12677468285045, 205.25984487258964, 202.2402218749717, 198.65566113312872, 197.47059068117505, 198.5415877288819, 199.89113760238322, 200.72574845774434, 199.54126701945583, 199.56692345549337, 202.45244596435143, 203.9666601639856, 203.16247208523228, 201.79534750558497, 200.30700213261454, 201.24226426417687, 198.36898251583094, 197.89530928674634, 198.61886237029452, 193.7299587462393, 189.43290914846412, 192.98729356708495, 190.34491684912322, 190.2227166082267, 192.52188789752128, 188.69073443263244, 190.95923364852743, 193.50690687817502, 194.84582458116319, 191.3947069979178, 191.4905923421133, 195.17026210185256, 195.29766582282883, 195.8142965286311, 196.04259298802293, 197.6994116296815, 199.80668648968742, 200.04907452149791, 199.1235011694647, 197.85750612927666, 198.47777161875987, 196.27136136908206, 195.95142973355323, 196.4652242389751, 197.97704506526935, 196.85383753971763, 197.6477953906945, 197.3023855781683, 197.29685389929233, 200.23209958017412, 201.66896578115347, 202.16982021700193, 202.92269933842377, 205.11923295437168, 204.92109955173677, 205.04458462541857, 203.52454472557525, 204.52447349547154, 204.4610832980803, 203.8376597855976, 205.8422395455799, 205.69195230465513, 206.2612832093656, 205.1859721078933, 204.8786304581532, 202.74314486530258, 206.0337885631821, 204.3019928692192, 206.43184548237844, 207.43462451827665, 207.57468549908356, 210.53265058136822, 210.03386675486055, 210.34796917958883, 211.35589860170035, 212.52904304657008, 211.25487331117705, 211.63015482867695, 210.2196252969206, 211.51901438144424, 210.23048685150033, 212.38239597443138, 210.47541881130581, 210.76708476199425, 206.263514156407, 206.55089787002785, 204.12365267689887, 204.0398615709918, 204.35590570497916, 204.680871508295, 204.23264291208392, 205.6030908345057, 207.9516255197782, 209.51868035319495, 209.3245695006556, 206.4982042587416, 207.7816649908055, 207.42941855185427, 206.5984798403356, 207.22784454291266, 208.23591459116005, 208.1066610651255, 207.32669923679114, 207.6833461645054, 207.58325482056634, 209.2925057228902, 209.53583943282092, 207.65049768851785, 206.66242988105716, 208.4335563750072, 208.5044156573297, 209.6377555778481, 210.64305199734827, 211.36433268489523, 211.46214668575087, 212.2801637197121, 212.3869253493789, 210.3318511526453, 209.0699481223376, 211.51433274236993, 208.07917462173825, 209.20553839728308, 210.09472443482488, 210.9668433018866, 211.5158172022337, 212.2848488820607, 211.5961053147049, 214.7192948134252, 215.56018506118153, 216.40204310279788, 216.07239282682943, 215.030886846068, 215.51524404999103, 215.2567184316367, 213.17008732771652, 212.1130196707933, 211.23898793423325, 210.64567116551922, 212.37794782219697, 211.87450971913248, 212.8887532953524, 212.17319559027916, 210.13830452354563, 211.6056003368656, 211.21676116322743, 212.99068210029208, 212.18184698759617, 211.4834073552036, 211.00780557074546, 209.5683229695611, 210.27098765836365, 211.03531225990395, 210.66245954495977, 210.33277782238082, 210.55301876575572, 208.70500839274553, 207.28031935663105, 206.67534646559622, 206.1278773961157, 199.48150751297808, 196.96513508624054, 199.7120184992755, 199.24061012646536, 204.25593128529437, 204.15159002800573, 200.20377719218118, 199.0339603703679, 198.09838548959203, 196.93804120041224, 189.5455392263283, 194.04461073178825, 190.82742121312504, 190.29783096442804, 191.8248413446464, 193.9353968737902, 199.42197814778783, 198.2087393654273, 198.69126586610952, 199.93224720290286, 203.91629912405705, 202.64950051601843, 199.49978894654603, 195.45703277514698, 195.62355880720972, 193.77510300263202, 196.33154657274073, 197.30321672514776, 193.4130247768705, 189.7646369177887, 191.73179745463418, 190.48290341968263, 192.5847333284585, 192.63150934569424, 197.3305936671389, 197.339974062148, 198.5716129913435, 200.69946564150666, 193.91102922547736, 193.50475957133364, 188.67487439206593, 187.8711643539705, 187.71861241598455, 188.8712768287258, 188.04774593200773, 185.0599157631398, 181.26174800696188, 181.25834954176077, 178.34813877848072, 174.8242104299835, 171.12410800315584, 166.71010140327033, 174.73734360606244, 175.16342592405047, 175.07802092964826, 176.17840245086975, 177.5827214866645, 174.1446947971404, 180.95848675802105, 183.32887228584303, 185.4056100712892, 185.53803725495243, 186.1839949702996, 186.5222476891078, 185.81216416285943, 187.6238618812286, 188.45344765369663, 190.0974035618882, 192.11117572550833, 188.61824568099388, 187.52057884591625, 188.900360551314, 191.78819661213993, 189.93964805179135, 190.42550277016048, 194.15923055276727, 195.0258080379272, 194.99347105772821, 197.0405188593612, 198.44224152209412, 198.19100810548693, 197.6810216314146, 197.66406723809814, 197.74815806930752, 198.94031473210873, 199.96078502218134, 200.1646940868978, 202.7491282236153, 203.35204375514832, 202.4644262354855, 201.82100213938446, 203.01968183410546, 204.40230785465104, 203.82234584098464, 203.79628481588773, 202.08803901695154, 202.6302857478735, 200.39188517698005, 199.84760383790584, 197.58657241102614, 195.69930118903702, 195.121226629919, 198.47338285631727, 199.28039042151735, 201.22659019045747, 200.4472651255753, 200.45118885234103, 201.41487681929334, 200.29054066932557, 199.30979713353017, 201.4906086719961, 196.32593292409993, 195.92584273009393, 197.24489621971736, 196.43231929918284, 197.94182610799908, 199.42582497957738, 201.4932749413768, 201.3346533471465, 202.9588097004719, 203.38640317883053, 204.57164682919753, 204.46476447253875, 202.68738500537654, 203.60810608127088, 201.34129931664947, 200.33443932744814, 200.26071206831406, 199.70564066695718, 197.81299307254872, 198.2307061483179, 198.92220071731805, 200.91134886081196, 200.41003775543732, 199.1794419907091, 200.9441706202062, 201.20105025613984, 200.91668490047894, 200.56403662019696, 201.22527341012724, 204.36809901162934, 204.12211240801773, 200.3818350689921, 198.84166533461075, 197.6898283784796, 198.83593753044343, 193.63682376723273, 195.40694246191268, 196.119142899332, 196.2388024441555, 194.70190040560416, 192.82817577469905, 195.47105492189047, 195.0533284094249, 192.39552117180182, 194.2111683683985, 192.8286508496027, 190.50888430094037, 190.39280046171905, 187.37547587073058, 188.1095141358904, 192.45514014417023, 192.92670756265235, 193.91405043223958, 194.77458930468384, 195.96716245637268, 197.1005784257911, 196.04462437336164, 197.75989827432116, 196.53047855198562, 197.35425062230829, 199.56422263132444, 200.27837262238324, 201.51169398747044, 201.6552858536237, 200.27885066858175, 198.59816782611162, 198.63319069269738, 200.32532147807055, 202.6567898619211, 204.55619018430596, 204.74124459858754, 206.52232236082315, 206.08749896479688, 204.24741838202175, 204.90635472158115, 205.1449330765022, 206.14434573404176, 207.6348436674322, 207.26994113277087, 206.97464224739463, 205.04707758539618, 204.099146667306, 203.09264758582407, 203.69721113818485, 205.04267666937446, 205.87777275090963, 204.42262778178284, 205.6047704263296, 205.0822964973773, 205.62816878911647, 204.71830572640457, 200.8172170982547, 198.9881422249444, 192.6405741543679, 194.55048861437334, 195.17627631478976, 198.1049714894615, 196.29477759967364, 193.92556144087374, 195.824825220203, 189.6451662256417, 189.0341482493151, 191.862878906732, 193.98496778500098, 192.33645727291295, 193.68208344619214, 192.74528724529915, 188.5629302390818, 190.33787393662166, 188.09556573136936, 189.81378106174793, 192.3376789841071, 193.97098398767662, 193.12863605076154, 196.30773153446302, 197.87454388773327, 197.88798939749532, 200.10426761332073, 201.73958582263145, 202.6946433007705, 202.7318192900048, 202.96953769262973, 204.0234624848873, 203.51287564513223, 202.43191675768966, 202.0876527366732, 201.60236579169512, 201.02965283910788, 198.433942452201, 199.14678726998667, 198.2198552808046, 197.8705506115719, 198.6400006270803, 196.70524557712932, 194.0999000228479, 195.18288964772884, 196.42988500439517, 195.29876657678886, 192.5702982523992, 193.13103861867194, 194.85502026936175, 198.4965418252591, 197.78942775096417, 199.78538611781536, 199.125031702728, 200.05642900077396, 198.88626752489026, 200.59508518960087, 200.9194883612725, 201.76142105062183, 202.07555799317868, 202.97924827968626, 202.8153722714725, 202.7083953006706, 202.31250064211358, 200.01830681098426, 203.22636028104495, 205.01980219454597, 204.88726297227953, 204.59908754967927, 205.30998316964792, 205.57292777290874, 204.71363778839944, 203.4527311106139, 203.0851066326397, 203.30545638476892, 205.36734257856727, 205.2910518401965, 204.81339097059853, 203.83980523141727, 204.3061380750648, 205.12561425725417, 206.9854766752123, 206.68384107004235, 207.58237421365038, 206.98503310897027, 205.46885723481273, 204.0205932216822, 205.28600872655872, 205.457964464958, 207.23844401398813, 206.72414194778096, 206.79930885120595, 205.92856395859977, 207.64536278089136, 207.43796780817058, 209.2162684671186, 210.5869012736929, 210.99991991132342, 211.1555957131064, 211.92123905448835, 212.823322302574, 213.27279694617945, 214.42490851645366, 214.04285593225373, 212.48416439421354, 213.32037372323606, 214.5805030912233, 213.80992983226056, 214.73512050884523, 213.6617596138234, 214.2994825396099, 215.1843194857858, 214.57895540117005, 216.00268576457896, 216.0553581279918, 216.63055336207515, 218.405894426685, 219.04452517816426, 218.3179970097726, 217.69049877905317, 218.61789103886636, 216.01053561731354, 211.85784538771557, 213.56094887470508, 214.81868835365069, 214.89529161549314, 210.94587443831955, 211.68496842886879, 216.14372258528522, 219.11451473482646, 218.80015769555007, 215.9904873158666, 216.75990442769663, 217.5340001027114, 219.36099583891115, 220.30757654866792, 221.20226141203182, 220.05153070357025, 220.13102165806964, 220.42033609817335, 218.52501121518333, 212.16740332464548, 204.5061038649365, 202.8239328245878, 193.89013460902996, 191.1963088434774, 199.13026918434633, 193.73799158936555, 199.7266855731466, 192.27806597387513, 188.34733932733624, 167.69188471790778, 176.76500666671237, 166.32488413186314, 146.2403708743527, 158.98527270085623, 136.6804853514543, 141.47951811520846, 127.6091495664633, 133.03825846716109, 128.64444886088907, 124.10916145507137, 137.3198504290559, 142.41941713638525, 149.339221615778, 143.33285970090122, 146.18188883492314, 144.05907958808794, 134.48465107651944, 135.10513044056623, 133.19843022602856, 143.53495798863128, 144.55298279460092, 151.38792164757086, 157.28773328841604, 154.84303373262483, 158.5817135137962, 151.81063012846457, 150.02965660163636, 157.98837984874666, 154.85625587029574, 150.22456579576428, 152.5846214231718, 154.0606746504144, 156.55643367597077, 162.32615303885237, 163.63951823717125, 170.32283976794199, 166.2775187209837, 159.77361087075, 161.6265923209255, 162.56112017860644, 162.05056691454212, 163.9445810160003, 168.42902204546854, 167.64020125710442, 164.46122175348387, 160.60756476148148, 162.7178288314963, 163.70012304033693, 171.85297942303998, 169.8211309516599, 173.74816455721046, 173.1167988008011, 173.10514293376858, 177.53147618265305, 180.55172651031975, 178.00161668269823, 178.49754904128463, 182.09583021199595, 184.49878700424085, 189.35455163041945, 190.64842795248677, 198.57033036668273, 203.67366819267497, 198.7118681080708, 194.06150745586262, 178.7485015464823, 183.25035755882587, 185.45792005860733, 189.1220594504166, 186.58534565584102, 187.2829132509115, 186.24732233705893, 186.70065891589675, 186.78004074857287, 179.9823640807037, 182.8398777464354, 176.71252141057556, 180.33766536762323, 183.06191327536487, 183.36229807052464, 183.22340885797783, 185.0636635466877, 181.85768397665973, 182.44071769156835, 179.9551081832495, 183.62047177114198, 182.31883713656154, 183.54917146963712, 188.19035760267565, 187.72741701606031, 187.48970380754722, 185.550239234514, 188.05906034461714, 188.43732245532067, 186.69905291123086, 184.62994870234607, 186.4953861221123, 185.51804503934125, 188.04456964056516, 184.9410468436882, 184.63778132821187, 188.33541746250611, 189.58981500640908, 189.11353330078933, 189.27223067889045, 190.64854506931525, 193.85291009381154, 192.35297078347523, 194.16596370857224, 194.04223000481392, 194.54591128680082, 194.30798995275907, 192.12189136858117, 191.11970851863418, 190.48228625828213, 189.5414864990465, 191.68321793251417, 191.42664366031644, 191.5148295036714, 191.65469526303124, 193.29249995640637, 192.15095022370372, 194.02967851477533, 195.46166482491577, 189.25545700257118, 188.45650238989293, 187.54358958856315, 188.73292102117418, 184.86529611734915, 183.97121229300728, 188.75774212367406, 188.86676551058008, 189.50111785861807, 188.94045054006295, 188.822984044865, 184.13878624101105, 184.58935892635472, 176.3180840175575, 175.27098444789095, 178.12005970980397, 180.7951722833561, 178.76758882297702, 181.04726993267568, 183.59301420805332, 183.9628752883226, 187.96553849641822, 185.30410380360564, 188.89633010551736, 190.96664715398518, 190.6930794074075, 191.91591151457317, 191.7544935326492, 189.92864374326646, 189.54925939891382, 187.5916796073532, 185.52912873629526, 186.07234706094704, 184.23302668247723, 186.71189422615686, 186.96713303433165, 183.45312544816963, 182.44963426660777, 177.11043929198993, 177.95120717931025, 176.21948767538646, 179.86139608821728, 183.4771827902954, 184.0917899005511, 189.7324811180818, 189.2771834416743, 194.77550106437428, 196.65420905614482, 198.23157558927085, 195.70047188271417, 199.30781812592193, 203.71616109131836, 203.8999515708272, 202.82811703933484, 204.12708395398448, 203.78719041315185, 207.9696133853174, 212.38270350259768, 211.0905944797017, 211.73589254295314, 207.2892589927264, 208.74809125557087, 211.16523519509818, 212.0702750778307, 215.8314695200366, 214.84026474784696, 215.85382785371831, 213.92335434967148, 215.44991734480578, 213.96185215711193, 212.31545444664835, 209.84083149493907, 208.0284021360239, 209.01141726656002, 207.8641867447532, 207.76975479541122, 208.42717819567233, 208.80165027888003, 208.3367472578563, 207.58816169234274, 205.8879894930313, 207.04877922812645, 208.07471308795806, 206.63515458832734, 209.27041118440593, 214.68344180558606, 220.3562470779713, 221.4478117387401, 219.80409445230262, 223.9159005125189, 225.0772118885561, 227.7110545629036, 222.59247244916685, 224.8817808926798, 226.49143411086632, 224.97899086778335, 224.86545494229233, 226.01924505797822, 224.76130710256106, 218.20132355329224, 219.84036558174074, 215.96908038984202, 219.0845525096734, 221.6058122998406, 221.99349532884415, 225.40835577722598, 227.37481864280522, 230.68318839809768, 230.55476584653243, 230.32786109863673, 232.0041888607867, 233.79527525495004, 231.60351317105307, 230.47559011703254, 226.39309940306302, 230.77919522181986, 227.47537553345845, 227.15482577261034, 229.32777213805971, 221.82642853124418, 221.49459775223005, 229.43283032917918, 228.01261594894802, 223.29149348637677, 215.91476417200363, 219.11903583637155, 218.52242677596334, 222.0565342286216, 225.51177836045878, 230.0515166771992, 230.9645746363397, 232.68235794533027, 229.4631450317597, 229.35321065018118, 224.12958614533605, 225.57370584728096, 225.98975299695414, 221.85628719299655, 218.51231375676525, 221.5986139924445, 224.44433094051183, 221.53471214145745, 222.75678866035702, 223.85417921901782, 227.27310443543448, 227.64442999346346, 228.48208211816282, 226.78585992817423, 227.11299934446237, 227.60684306542345, 226.3694188908842, 226.37547358618883, 228.0645830856818, 228.8242510559684, 229.68922788032472, 227.93545795310055, 225.38611212606588, 228.66513099280192, 226.206094009562, 229.24046574246674, 231.50894744065627, 230.91805573457455, 231.79051237880074, 230.74251198910451, 228.64438810616787, 228.31120317392273, 226.30495922995934, 225.44460763715423, 223.30963234412482, 226.74231361632283, 224.1949695544307, 225.07309046323775, 218.91323105693854, 219.5533955118367, 224.3826788330498, 225.186222443421, 225.0116742342862, 222.65966169807615, 225.65798245629856, 226.65429526420706, 227.38521889388107, 225.89808169180512, 229.30788993173198, 230.69237955733982, 230.510784430448, 232.32779683259338, 233.3032175472515, 231.72879528439333, 233.52852374518707, 234.82734831913547, 236.0350468727675, 236.40516183614815, 235.37590177841574, 236.17137524146924, 234.64506186344408, 232.79742939430642, 231.0674124646231, 227.85054737230965, 223.86953678675565, 227.4474441987087, 228.8564955578592, 228.77075340010467, 230.7459704848984, 231.82385908341237, 231.64381659941827, 230.7412127160522, 232.6404524110246, 233.52916103648022, 232.93534844146103, 230.24753577390663, 229.10005796955483, 227.53252868249623, 231.9188825913383, 232.44175662717876, 230.1436841175481, 228.84730917930926, 228.6154586169029, 225.8156337971239, 222.00112536886476, 227.1485083741395, 229.38513297300827, 228.49906796548692, 229.1569143360322, 230.468672512037, 229.13493955798432, 230.63043945126105, 231.0213225480636, 229.01467602845818, 228.03490873310716, 230.3608523165406, 228.88559223025794, 231.7627334357036, 231.9382592682075, 232.8986801213952, 233.91362220988802, 235.1696442889614, 235.9871659502977, 234.63566577300065, 233.59577507742455, 232.75590454841407, 229.06566841835695, 226.97223573515532, 230.2042552677191, 233.21902670269222, 233.9692842639, 235.7437404693826, 234.8507277926275, 237.87972996926678, 237.1728856262425, 236.90348265827546, 237.6372836367612, 238.69907520333612, 238.22129676681408, 237.23470821071174, 236.19079428240408, 235.24880179527082, 232.9162635465402, 233.67549604270533, 231.90543818203156, 234.38489277926845, 233.5986435061745, 231.9160611586167, 227.66645713156845, 227.53746609231564, 230.5031817287818, 233.3502082584801, 232.41305866076476, 233.55288800308364, 229.4390470382345, 229.0250181677263, 226.94273768144708, 229.68188140114128, 226.69554610175635, 227.87077984252926, 227.6211660219518, 230.3964750796649, 230.43551353297403, 229.1201480419669, 230.01026649190698, 231.64753953456042, 234.6245404199659, 235.43806680806392, 236.39805425221658, 238.6723006163496]
Now, the moment of truth: Did the Senate outperform the S&P 500 from 2012-2021?
To compare senators' investing abilities against the market, we compared our calculated senator index with stock market indexes, specifically the S&P 500 and Nasdaq Composite. Our senator index function uses an initial reference index value of $100 and measures the change over time. We used the same overlapping time frame for the stock market indexes and our senator index, 2012-09-13 to 2021-11-29. To fit our stock market indexes to the initial 100 reference index, we took the stock market index at 2012-09-13 and for each consecutive day we divided each day's value by the initial 2012-09-13 value and multiplied by 100. As a result, we have the senator index plotted with the stock market indexes fitted to have an initial value of 100 so that their performances can be measured proportionally over time. Using this graph, we can determine the performance of our senator index compared to multiple stock market indexes and if the STOCK Act was effective in preventing senators from profiting from insider trading.
# Import S&P 500 and NASDAQ data
sp_data = pd.read_csv("sp_10_year_prices.csv")
nasdaq_data = pd.read_csv("nasdaq_10_year_prices.csv")
# Convert Date values to datetime
sp_data['Date'] = pd.to_datetime(sp_data['Date'])
nasdaq_data['Date'] = pd.to_datetime(nasdaq_data['Date'])
# Identify first and last transaction date for senate index
first_date = senate_data.head(1).transaction_date
last_date = senate_data.tail(1).transaction_date
# Sort S&P 500 and NASDAQ data by date
sp_data = sp_data.sort_values(by='Date', ascending=True)
nasdaq_data = nasdaq_data.sort_values(by='Date', ascending=True)
# Drop dates outside timeperiod for NASDAQ
nasdaq_data = nasdaq_data.drop(nasdaq_data.index[0:193])
nasdaq_data = nasdaq_data.drop(nasdaq_data.tail(14).index)
# Drop dates outside timeperiod for S&P 500
sp_data = sp_data.drop(sp_data.index[0:195])
sp_data = sp_data.drop(sp_data.tail(0).index)
# Grab inital value of S&P 500 and NASDAQ
initial_value = sp_data.iloc[0]['Close/Last']
initial_value_nasdaq = nasdaq_data.iloc[0]['Close/Last']
# Adjust inital values of S&P 500 and NASDAW to $100
nasdaq_data['adj_value'] = (nasdaq_data['Close/Last']/initial_value_nasdaq)*100
sp_data['adj_value'] = (sp_data['Close/Last']/initial_value)*100
# Plot adjusted S&P 500
date = sp_data['Date'].to_list()
value = sp_data['adj_value'].tolist()
plt.plot(date, value, color = "red", label = "S&P 500")
# Plot Adjusted NASDAQ
date = nasdaq_data['Date'].to_list()
value = nasdaq_data['adj_value'].tolist()
plt.plot(date, value, color = "green", label = "NASDAQ")
# Plot Senator Index
x= (trading_dates[default_senate_calculation["days_until_first_trade"]:len(default_senate_calculation["index_by_day"])+default_senate_calculation["days_until_first_trade"]])
y= default_senate_calculation["index_by_day"]
plt.plot(x, y, color="blue", label="Senator Stock Index")
plt.xlabel("Year")
plt.ylabel("Value ($)")
plt.title("S&P Index (Adjusted) vs Senator Stock Index")
plt.rcParams["figure.figsize"] = (25,10)
plt.legend()
plt.show()
In the chart above, the blue line is the index representing the Senate's performance, the red line is the S&P 500 index, and the green line is the Nasdaq Composite index. The intuitive way to interpret the chart is: If you'd invested \$100 into a portfolio managed by the Senate in 2012, your investment would be worth about \$200 now in 2021. Doubling the value of your investment over 9.5 years isn't bad, right?
Wrong. Because if you'd invested the same \$100 into a low-cost exchange-traded fund (ETF) tracking the S&P 500 in 2012, your investment would be worth over \$300 now in 2021. Logically, you would've chosen to invest in the S&P 500 ETF instead of with the Senate since you would've made more money at a lower cost and risk by just following the market.
Additionally, if you'd invested the same \$100 into a low-cost ETF tracking the Nasdaq Composite in 2012, your investment would be worth even more now in 2021 — over $500.
Thus, the answer to our question, "How well do U.S. Senators trade? Do they consistently outperform the S&P 500 index?", is that Senators, when taken as a whole, have traded poorly and underperformed the market in almost every year since the STOCK Act prohibited them from engaging in insider trading. After making it illegal for themselves to engage in insider trading, Senators are no longer able to achieve the above-average gains that they achieved when they were allowed to engage in insider trading during the 1990s.
Below, we quantify our results and examine the annual percentage returns for the Senate and S&P 500 from 2013-2020.
annual_sp = {}
#annual_sp[2012] = (sp_data.iloc[77]['Close/Last']/sp_data.iloc[0]['Close/Last']) # Not a full calender year
annual_sp[2013] = (sp_data.iloc[338]['Close/Last']/sp_data.iloc[78]['Close/Last'])
annual_sp[2014] = (sp_data.iloc[599]['Close/Last']/sp_data.iloc[339]['Close/Last'])
annual_sp[2015] = (sp_data.iloc[860]['Close/Last']/sp_data.iloc[600]['Close/Last'])
annual_sp[2016] = (sp_data.iloc[1129]['Close/Last']/sp_data.iloc[861]['Close/Last'])
annual_sp[2017] = (sp_data.iloc[1363]['Close/Last']/sp_data.iloc[1130]['Close/Last'])
annual_sp[2018] = (sp_data.iloc[1614]['Close/Last']/sp_data.iloc[1364]['Close/Last'])
annual_sp[2019] = (sp_data.iloc[1866]['Close/Last']/sp_data.iloc[1615]['Close/Last'])
annual_sp[2020] = (sp_data.iloc[2119]['Close/Last']/sp_data.iloc[1867]['Close/Last'])
#annual_sp[2021] = (sp_data.iloc[2348]['Close/Last']/sp_data.iloc[2120]['Close/Last']) # Not a full calender year
# Create a dataframe storing the annual returns for the Senate and S&P 500 and the differences between them for easy comparison
returns = pd.DataFrame()
years = annual_sp.keys()
returns['Year'] = years
# Add the Senate's annual returns
senate_returns = default_senate_calculation['annual_return']
try:
senate_returns.pop(np.datetime64("2012"))
senate_returns.pop(np.datetime64("2021"))
except:
pass
senate_returns_over_annual_sp_list = [senate_returns[i]/annual_sp[j] for i,j in zip(senate_returns, annual_sp)]
senate_returns_list = list(senate_returns.values())
annual_sp_list = list(annual_sp.values())
returns['Senate Return'] = [(str((factor-1)*100)+"%") for factor in senate_returns_list]
# Add the S&P 500's annual returns
returns['S&P 500 Return'] = [(str((factor-1)*100)+"%") for factor in annual_sp_list]
# Add a column storing the differences between the Senate and S&P 500's annual returns
returns['Senate Under/Outperformance'] = [(str((factor-1)*100)+"%") for factor in senate_returns_over_annual_sp_list]
print(returns)
# Calculate the average annual return for the Senate and S&P 500 and the difference
senate_avg_return = sum(senate_returns.values())/len(senate_returns)
sp_avg_return = sum(annual_sp.values())/len(annual_sp)
avg_difference = sum(senate_returns_over_annual_sp_list)/len(senate_returns_over_annual_sp_list)
print("Senate stock index average return by full calender year: " + str((senate_avg_return-1)*100) + "%")
print("S&P 500 average return by full calender year: " + str((sp_avg_return-1)*100) + "%")
print("Average performance ratio of Senate to S&P 500 by full calender year: " + str((avg_difference-1)*100) + "%")
Year Senate Return S&P 500 Return Senate Under/Outperformance 0 2013 19.05808790795911% 29.601245275874867% -8.135074123302699% 1 2014 6.366424649508939% 11.390638187366097% -4.51044506038839% 2 2015 -5.010203861762042% -0.726601583369757% -4.314954808351457% 3 2016 17.383929532943387% 14.111673109218636% 2.867591311708151% 4 2017 27.875925283281823% 16.512905882711838% 9.752584329163172% 5 2018 -15.132846989715375% -7.009396062778905% -8.735776070903567% 6 2019 5.721781316130103% 28.71479623749518% -17.86353674440041% 7 2020 9.390483956187223% 15.292907899381492% -5.119503055942898% Senate stock index average return by full calender year: 8.206697724316658% S&P 500 average return by full calender year: 13.486021118237424% Average performance ratio of Senate to S&P 500 by full calender year: -4.507389277802254%
What if the Senate was a hedge fund and each Senator got an equal say in what the hedge fund invested in? That is, if the hedge fund had \$100 million to invest, each Senator would be able to decide how to invest \$1 million of it since there are 100 Senators. Let's calculate an index that's equally weighted between the Senators who were trading at any given time.
# Plot adjusted S&P 500
date = sp_data['Date'].to_list()
value = sp_data['adj_value'].tolist()
plt.plot(date, value, color = "red", label = "S&P 500")
# Plot Adjusted NASDAQ
date = nasdaq_data['Date'].to_list()
value = nasdaq_data['adj_value'].tolist()
plt.plot(date, value, color = "green", label = "NASDAQ")
# Plot Senator Index
x= (trading_dates[equally_weighed_senate_calculation['days_until_first_trade']:len(equally_weighed_senate_calculation['index_by_day'])+equally_weighed_senate_calculation['days_until_first_trade']])
y= equally_weighed_senate_calculation['index_by_day']
plt.plot(x, y, color="blue", label="Senator Index")
plt.xlabel("Year")
plt.ylabel("Value ($)")
plt.title("S&P Index (Adjusted) vs Senator Index (Equally Weighed)")
plt.rcParams['figure.figsize'] = (25,10)
plt.legend()
plt.show()
The chart above is similar to the previous chart, but instead of calculating the holdings of all senators as one group, it weighs all senators who have stocks equally, i.e., if there are 5 senators with stocks, then each senator will be 20% of the index at that point in time. The idea behind this index is that just because a senator has more money does not necessarily mean that they manage it better. For instance, some senators who are much older have had a lot more time to accumulate money. The equal-weighted index basically gives each senator an equal voice in the portfolio and allows us to see whether, with the bias of wealth removed, how good senators are at picking stocks to buy and sell.
As you can see, when each Senator gets an equal voice in determining which stocks to buy and sell, the Senate performs better as a whole. Although the Senate would still underperform the S&P 500 and Nasdaq Composite from 2020-2021, it would outperform at least the S&P 500 from 2014-2019.
To analyze and compare the performance of the Senate's returns, we plotted a multi bar graph of annual returns from the Senate index and the S&P 500. Alongside the percent annual returns from 2012-2021 for the Senate and S&P 500, the green bar represents the performance of the Senate annual returns compared to the S&P 500. As indicated by the multi bar graph, the Senate's annual returns tended to underperform compared to the S&P 500, except in 2016 and 2017. For the rest of the years, the Senate had a negative return compared to if they had instead invested in the S&P 500.
labels = years
x = np.arange(len(labels)) # the label locations
width = 0.2 # the width of the bars
labels = [0]
for year in years:
labels.append(year)
fig, ax = plt.subplots()
senate_returns_list = [(factor-1)*100 for factor in senate_returns_list]
annual_sp_list = [(factor-1)*100 for factor in annual_sp_list]
senate_returns_over_annual_sp_list = [(factor-1)*100 for factor in senate_returns_over_annual_sp_list]
rects1 = ax.bar(x - width, senate_returns_list, width, label='Senate Return')
rects2 = ax.bar(x, annual_sp_list, width, label='S&P 500 Return')
rects3 = ax.bar(x + width, senate_returns_over_annual_sp_list, width, label='Senate Under/Outperformance')
# Add some text for labels, title and custom x-axis tick labels, etc.
ax.set_ylabel("Percent Annual Return")
ax.set_xlabel("Year")
ax.set_title("Annual Return of S&P 500 and Senate")
ax.set_xticklabels(labels)
ax.legend()
fig.tight_layout()
plt.show()
To explore what senators commonly invested in, we constructed multiple pie charts to analyze the sectors of purchased stocks for each year. Using our senator data from senatestockwatcher.com and ticker data from compustat with GICS values, we graphed each sectors' purchase percentage for that year. From our pie charts, you can see that Utilities and Real Estate weren't commonly purchased sectors, while Energy, Materials, Industrials, Financials, Information Technology, and Health Care were consistently purchased more frequently. Interestingly, 2014, 2016, 2017, and 2018 had the most equally distributed sector purchases.
# Pie charts of sector purchases each year
xlabels=["Energy", "Materials", "Industrials", "Consumer Discretionary", "Consumer Staples", "Health Care", "Financials", "Information Technology", "Communication Service", "Utilities", "Real Estate", "Other"]
# Collect sector data for each yera
for year in default_senate_calculation['purchases_by_year']:
total = default_senate_calculation['purchases_by_year'][year]['total']
keys = default_senate_calculation['purchases_by_year'][year]['by_sector'].keys()
values = default_senate_calculation['purchases_by_year'][year]['by_sector'].values()
y = []
# Plot Pie graph
for v in values:
y.append((v/total) * 100)
df = pd.DataFrame({'percent annual purchases': y}, index=xlabels)
plot = df.plot.pie(y="percent annual purchases", colors=["red", "green", "orange", "blue", "cyan", "pink", "purple", "gray", "brown", "black", "lime", "lightsteelblue"] , figsize=(15, 15))
plt.title(str(year)+" Sector Purchases")
Another way we visualize the sector distribution is using a multi line graph that also tracks each GICS® sectors' purchase percentage for each year. From our line graph, we see that Materials, Financials, Information Technology, and other sectors outside the GICS sectors increased in percent of annual purchases from 2019-2021. While it appears that Senators mostly purchased stocks within the Materials and Financials sectors in 2012-2013, the data from that time period is very limited and therefore shouldn't be considered strongly when analyzing the sector purchase distributions over time.
# Line graph of sector purchases each year
fig, ax = plt.subplots(figsize=(30,15))
xlabels=["Energy", "Materials", "Industrials", "Consumer Discretionary", "Consumer Staples", "Health Care", "Financials", "Information Technology", "Communication Service", "Utilities", "Real Estate", "Other"]
tics = ["10.0", "15.0", "20.0", "25.0", "30.0", "35.0", "40.0", "45.0", "50.0", "55.0", "60.0", "nan"]
years = list(default_senate_calculation['purchases_by_year'].keys())
sector_data = {}
for l in tics:
sector_data[l] = []
# Calculate percent annual purchase for each sector per year
for year in default_senate_calculation['purchases_by_year']:
for s in default_senate_calculation['purchases_by_year'][year]['by_sector'].keys():
sector_data[s].append(default_senate_calculation['purchases_by_year'][year]['by_sector'][s]/(default_senate_calculation['purchases_by_year'][year]['total']))
# Plot line graph
for l in tics:
plt.plot(years, sector_data[l], label = xlabels.pop(0))
plt.legend()
plt.title("Yearly Sector Purchases")
plt.xlabel("Year")
plt.ylabel("% Annual Sales")
plt.show()
Our results align with those in an April 2020 paper published in the National Bureau of Economic Research by a team at Dartmouth College. The team, consisting of an economics professor and two students, studied Senators' stock-trading performance between 2012, when the STOCK Act was passed, and March 2020, after the congressional insider trading scandal came to light. The overall conclusion of their study was that Senators' stock purchases lagged the market at six-month intervals by 0.17% while also underperforming at shorter intervals.
You can find the MarketWatch article on the study here.
And the link to the PDF of the full study here.
Based on our line graph with our calculated Senator index and Adjusted S&P 500 and NASDAQ market indexes, we can clearly see that Senators are consistently underperforming compared to the market indexes from 2012-2021. Therefore if someone were to compare investing $100 into what Senators invested in 2012, it would only be worth $200. Instead if someone were to purchase a single ETF tracking the S&P 500 or NASDAQ also at $100, it would be currently worth $300 or $500, respecitvely.
While our analysis can't give a definitive answer on whether the STOCK Act prevented Senators from benefiting from insider trading, our analysis does provide evidence that it did. When comparing our Senate index with the S&P 500 and NASDAQ, Senators consistently underperformed the market indexes. Given that Senators were no longer able to beat the market as they had before the STOCK Act in the 1990s, this suggests that the STOCK Act may have been effective in preventing Senators from benefiting from insider trading because of the Senate's inability to consistently outperform the market after the STOCK Act.
Finally, while we used Compustat to access stock data, not everyone has access to it like we did, so they can use polygon.io or scrape data from TradingView.